Skip to content
Snippets Groups Projects
Commit 4faa1038 authored by Roman Khabibov's avatar Roman Khabibov Committed by Kirill Yukhin
Browse files

httpc: allow only strings for opts.headers values

There are two reasons to disable support of tables with __tostring
metamethods as opts.headers values:

* It seems this feature is not much needed: a type convertion can be
  easily done on a user's end with explicit tostring() call if needed.
* It never did work since introduction in 2.1.1-311-g85e1d78bc ('httpc:
  add checking of headers in httpc:request'): __tostring presence was
  verified, but a function in the field was not invoked.

Now http client accepts only a Lua string as a header key or a value.

Closes #3679 (again).

(cherry picked from commit 28e688294b8ae3868c138a9de965479e8de24c3e)
parent 67e5f9a5
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment