-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add JRuby support for username and password parsing from urls #5
Comments
I currently have no idea how to parse username and password according to current http-parser.java implementation, I opened an issue to the author to see if he has any idea. a2800276/http-parser.java#5 |
@deepfryed according to a2800276/http-parser.java#5, username and password won't hit server, so I don't think http-parser-lite need to care about username and password. |
Yes and no. http-parser is a simple request/response parser. So it needs to be able to parse the url and password in url to allow the application to create appropriate authorization headers if needed. e.g. in a proxy server |
I believe http clients / browsers will automatically wrap username and password into http authorization header, here is an example
|
yeah, i get it. but not needed when you proxy. GET https://foo:[email protected]/hello You could technically use http-parser-lite in implementing a proxy server. There is a reason why the C version has it :) |
okay, would you mind ignoring username and password for jruby, just leaving a notice on README, saying only c extension support username and password? |
i'd love to have that supported in jruby as well, to keep the gotchas to minimum. is it too much work ? |
seems not easy to implement, probably take a long time |
hmm, the problem is then you have something working while using MRI and not working in JRuby. This is not an API call that can raise NotImplemented error but will fail at the parser level when parsing urls with username and password. I don't think I like that even if explicitly documented :( I'll see if i can hack some java code but I'm pretty busy at the moment and don't know when I can find some time to do it. |
What it says :)
/cc @flyerhzm
The text was updated successfully, but these errors were encountered: