Closed AntonSizov closed 11 years ago
The host is lowercased and we don't have the scheme at all. What do you mean exactly?
Connected to missing scheme -- that's how i have to deal with that -- https://github.com/dvv/social/blob/master/src/cowboy_social.erl#L18-L28 . Currently, cowboy relies on transport to guess scheme, which is not enough in case of cowboy behind an SSL terminator.
Don't think Cowboy can guess behind what it's running.
Vladimir Dronnikov notifications@github.com wrote:
Connected to missing scheme -- that's how i have to deal with that -- https://github.com/dvv/social/blob/master/src/cowboy_social.erl#L18-L28 . Currently, cowboy relies on transport to guess scheme, which is not enough in case of cowboy behind an SSL terminator.
— Reply to this email directly or view it on GitHub.
But it guesses IP:
{ForwardedForRaw, Req2} = header(<<"x-forwarded-for">>, Req1),
;)
Yeah but that's non standard and the peer_addr function that uses it will be removed soon too.
Vladimir Dronnikov notifications@github.com wrote:
But it guesses IP:
{ForwardedForRaw, Req2} = header(<<"x-forwarded-for">>, Req1),
;)
— Reply to this email directly or view it on GitHub.
Sorry. I misread specification and misunderstood what scheme exactly means. The question was about does http://mysite.com/path/to/resource match the http://mysite.com/PATH/TO/Resource Now I figured out that it doesn't as section 3.2.3 of rfc2616 says.
Will the function peer/1 be removed as well as peer_addr/1? Will there a possibility to figure out a peer addr after you remove those functions?
Oh the path, yeah it's not insensitive.
peer/1 stays, peer_addr/1 remains and will have the header parsing code added to parse_header instead so you can easily write the function the way you need it.
Thx
As I figured out, cowboy 0.8.2 doesn't support case-insensitive host and scheme names as described in rfc2616 and rfc1945 What are the reasons for such implementation?