bzr ERROR: Invalid http response
Aaron Bentley
aaron at aaronbentley.com
Sun Feb 10 21:27:16 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Erik de Castro Lopo wrote:
> Vincent Ladeuil wrote:
>
>> See https://bugs.edge.launchpad.net/bzr/+bug/190501.
>>
>> This should indeed be easy to fix in boa.
>
> I'm looking at RFC 2616:
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5
>
> and I don't see anything stating "204 is not intended to be used for
> zero size files but for empty bodies".
If you navigate to a zero-length text file, the correct display is a
blank document.
But the RFC says (of 204): "If the client is a user agent, it SHOULD NOT
change its document view from that which caused the request to be sent."
So if the response is a 204, your previous web page would continue to be
displayed.
The RFC goes on to say: "This response is primarily intended to allow
input for actions to take place without causing a change to the user
agent's active document view, although any new or updated
metainformation SHOULD be applied to the document currently in the user
agent's active view."
So you would continue to view the web page, but the headers for the text
file would be applied to the web page, causing it to be displayed as
text/plain.
This is clearly nothing like what you would expect to happen by viewing
a zero-length text file, but it is what the RFC says should happen if a
204 is returned. Therefore, clearly 204 is the wrong response in this
context.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHr2wz0F+nu1YWqI0RAruYAJ9CHnPPerC9yfeLz9fJQM1TT4qzbACdHGim
F/B1I92pPACmsCh+w7wqIfA=
=FGYn
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list