Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Host header standard ports #1361

Closed
karrots opened this issue Jun 15, 2016 · 0 comments
Closed

HTTP Host header standard ports #1361

karrots opened this issue Jun 15, 2016 · 0 comments

Comments

@karrots
Copy link
Contributor

karrots commented Jun 15, 2016

Expected behavior

HTTP module sends port as portion of Host header value only if using non-standard ports

Actual behavior

HTTP module sends host:port even when using standard ports. While technically not against RFC it does break some virtual host environments.

Link to another project that details this issue.

Test code

The code below when captured with Wireshark or similar packet capture will show Host: httpbin.org:80. Nginx or httpbin's code seems to strip the port 80 off the request before displaying it back to the user.

http.get("http://httpbin.org/headers", nil, function(code, data)
    if (code < 0) then
      print("HTTP request failed")
    else
      print(code, data)
    end
  end)

NodeMCU version

dev 500bbce

Hardware

Bug hardware agnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants