Comments (7)
@justindarby Can you please provide a sample of response? Pull request, which you referencing was closed as it was fixed actually (if I'm not missing anything):
parser = HTTP::Parser.new
parser << "HTTP/1.1 204 No Content\r\nSet-Cookie: foo=1;\r\nSet-Cookie: bar=2;"
parser.headers # => {"Set-Cookie"=>["foo=1;", "bar=2;"]}
from http.
I think I might understand why this is broken.
parser = HTTP::Parser.new
parser << "HTTP/1.1 200 Stuff\r\nCache-Control: no-cache\r\nContent-Length: 3\r\nContent-Type: text/xml;charset=UTF-8\r\nContent-Language: en\r\nServer: Microsoft-IIS/7.5\r\nset-cookie: _secret=magic; Version=1; Path=/obscured_path; HTTPOnly\r\nset-cookie: _moresecrets=magic2; Version=1; Path=/obscured_path2; HTTPOnly\r\nX-Powered-By: ASP.NET\r\nDate: Fri, 31 Jan 2014 15:43:22 GMT\r\nSet-Cookie: lbvendor-cookie_https=somestuffthatdoesthings0; path=/\r\n\r\n</>"
The back-end server is actually using a mix of lowercase set-cookie and Set-Cookie because it's a poorly written giant vendor application. It's working here but we have two sets, Set-Cookie and set-cookie, and I bet Set-Cookie is winning somewhere else during normalization?
from http.
Ah. That makes sense. Headers are normalized indeed.
An easy fix though.
from http.
@ixti Can you please add tests that verify this fix and prevent future regressions?
from http.
Yeah. Was going at first place, but then got too lazy. Will do today.
from http.
@sferik That was a good idea - that place had hidden bugs indeed
from http.
from http.
Related Issues (20)
- feature request: happy eyeballs
- Can we update to llhttp-ffi 0.5.0 HOT 2
- access ssl certificate details? HOT 4
- Issues running it on Mac Intel (12.6) HOT 3
- SSLERROR occurred when running http method in the executable file: certificate verify failed. HOT 1
- 403 and 404 responses for valid URLs HOT 7
- raise error when invalid hash is passed to timeout HOT 1
- Are you open to include rspec_matchers? HOT 18
- File descriptor / socket leak when timeout occurs during initialization
- How to query the remote server address? HOT 1
- Make HTTP::Feature work like rack middleware HOT 10
- Remove auth header after following a redirect to a different origin
- Support HTTP headers streaming HOT 2
- Timeout redesign for 6.x HOT 4
- Fix Base64 dependency warning HOT 4
- Version 5.x bump? HOT 3
- project level timeout HOT 2
- `HTTP::Response::Body#each` and `BUFFER_SIZE`
- Feature Request: Better Control of Logging for Binary Request Body / Response Body
- Bug: Using Logger Breaks Request Streaming
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http.