Closed Bug 39290 Opened 25 years ago Closed 10 years ago

Need to handle 505 response

Categories

(Core :: Networking: HTTP, defect)

All
Windows NT
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ruslan, Unassigned)

Details

(Whiteboard: [nsbeta2-])

Need to handle 505 response (http version not supported). I've never seen it actually happening, but if we go by the book - we need to implement it.
Status: NEW → ASSIGNED
Keywords: nsbeta2
Target Milestone: --- → M17
Putting on [nsbeta2-] radar. Not critical to beta2.
Whiteboard: [nsbeta2-]
What should happen if we receive a 505?
We should resubmit the original request, downgrading http version.
From what I can tell, the handler code for this needs to be added to nsHTTPServerListener::OnDataAvailable in the if (mResponse) { .... block. Am I correct?
I has to be along the line of implementation of SSL CONNECT handling, look into nsHTTPResponseListener,nsHTTPRequest
So we couldn't detect it at the same place we detect "304" responses?
-> future
Target Milestone: M17 → Future
pulling in ruslan's necko bugs ->darin
Assignee: ruslan → gagan
Status: ASSIGNED → NEW
Target Milestone: Future → M19
->neeti
Assignee: gagan → neeti
Target Milestone: --- → mozilla1.0
mass move, v2. qa to me.
QA Contact: tever → benc
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 (you can query for this string to delete spam or retrieve the list of bugs I've moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Target Milestone: mozilla1.0.1 → Future
moving neeti's futured bugs for triaging.
Assignee: neeti → new-network-bugs
-> http
Assignee: new-network-bugs → darin
Component: Networking → Networking: HTTP
QA Contact: benc → httpqa
QA Contact: httpqa → tever
fair enough... but it'd be nice if there were an actual testcase / known-to-be-broken-site out there.
Well, the only protocols we handle are 1.0 and 1.1 (we handle 0.9, but don't support sending it). The http specs say that servers should ignore the minor version for this, and the bit talking about the 505 error explicitly mentions the major version. So this leaves us with 3 cases: - We send an http/1.x request to a server which only supports http/2.x. In this case, we couldn't do anything, since we don't suport 2.x. - We send an http/1.1 request to a server which only udnerstands 1.0, and erroniously rejects our request. Since the 505 error code was only introduced in 1.1, it wouldn't be sending this to us, and would probably send a 400/500 response. Again, we can't do anything. - We send a http/0.9 request to a server which doens't support it (I don't think we support doing this, but...). 0.9 doesn't support response codes, so the server couldn't let us know. IOW, I think that until HTTP/2.0 comes out, theres nothing we can do here, and adding this woudl jsut add code complexity for a code path which would never be exercised.
Bradley: you're forgetting sending a 1.0 request to an 0.9 server. FWIW, I don't believe this will actually happen in practice often enough to warrant implementing it, but it may be an issue when 2.0's nearing fruition.
No, I'mn not forgetting 0.9 servers. Not only was this status code only introduced for 1.1, but 0.9 servers don't send a status line at all, so theres no way of getting any error code. When (if) HTTP/2.0 comes along, then we can revisit this, I guess.
-> default owner
Assignee: darin → nobody
QA Contact: tever → networking.http
Target Milestone: Future → ---
http/2 doesn't use this mechanism.. if it becomes necesarry we can open a fresh issue
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.