expert
expert

Reputation: 30135

Is replying to client before receiving complete request allowed for HTTP 1.0 server?

I couldn't find RFC that may answer this question. Perhaps you guys can point me to right direction.

I'm implementing strippeddown http server whose only function is to accept big multi-part encoded uploads.

In certain cases, such as file is too big or client is not authorized to upload, I want server to reply with error and close connection immediately.

It looks like Chrome browser doesn't like it because it thinks server returned http code zero.

Could not get any response

This seems to be like an error connecting to http://my_ubuntu:8080/api/upload. The response status was 0.
Check out the W3C XMLHttpRequest Level 2 spec for more details about when this happens.

Therefore question:

Is replying to client before receiving complete request allowed for HTTP server ?

update: Just tested it with iOS 6 client. Same thing, it thinks server abruptly closed connection :(

Upvotes: 6

Views: 1370

Answers (2)

someone
someone

Reputation: 1

I think this is certificate trust issue. Try manually trusting the site and subsequent requests should work.

Upvotes: 0

bitops
bitops

Reputation: 4292

This is a great question and apparently it is very ambiguous. You will probably enjoy reading this article on the "Million Dollar Bug" - http://jacquesmattheij.com/the-several-million-dollar-bug

Upvotes: 1

Related Questions