CVSROOT:        /cvs/gnome
Module name:    libsoup
Changes by:     danw    06/07/21 12:36:56

Modified files:
        .              : ChangeLog 
        libsoup        : soup-message-client-io.c soup-message-io.c 
                         soup-message-server-io.c soup-message.c 
                         soup-message.h soup-server-message.c 
                         soup-server.c 
        tests          : get.c simple-httpd.c 

Log message:
* libsoup/soup-server-message.c (soup_server_message_init):
initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
actually worked here, and so there was an undocumented requirement
that you manually set the encoding on every response
(which SoupServer itself was not doing on internal errors).
Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
(soup_server_message_set_encoding): reject the new
SoupTransferEncoding values, for compatibility

* libsoup/soup-message.h (SoupTransferEncoding): Clarify that
SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
public API, it always has been, due to bugs. Add some new values,
currently just for internal use: SOUP_TRANSFER_NONE (for cases
like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
actually implemented yet).

* libsoup/soup-message.c (soup_message_get_request_encoding,
soup_message_get_response_encoding): figure out the body encoding
being used by the request/response, including all the tricky
cases like HEAD/1xx/etc.
(soup_message_is_keepalive): if the response encoding is
SOUP_TRANSFER_EOF, then the message isn't keepalive.

* libsoup/soup-message-client-io.c (parse_response_headers): use
soup_message_get_response_encoding.

* libsoup/soup-message-server-io.c (parse_request_headers): use
soup_message_get_request_encoding.
(get_response_headers): use both soup_server_message_get_encoding
and soup_message_get_response_encoding, to properly distinguish
between the wire encoding and the alleged-by-headers encoding
(which differ for HEAD, etc).

* libsoup/soup-message-io.c (io_error, read_body_chunk):
s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
(io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
SOUP_MESSAGE_IO_STATE_FINISHING.

* libsoup/soup-server.c (request_finished): Check
soup_socket_is_connected() *before* soup_message_is_keepalive(),
since the message will be invalid if the client unexpectedly
dropped the connection.

* tests/simple-httpd.c (server_callback): handle HEAD requests.
Remove no-longer-necessary soup_server_message_set_encoding()
call.

* tests/get.c: add -d (debug) flag to print headers, and -h flag
to do a HEAD rather than GET

URL : 
http://cvs.gnome.org/bonsai/cvsquery.cgi?branch=&dir=libsoup&who=danw&date=explicit&mindate=2006-07-21%2012:35&maxdate=2006-07-21%2012:37

_______________________________________________
cvs-commits-list mailing list
cvs-commits-list@gnome.org
http://mail.gnome.org/mailman/listinfo/cvs-commits-list

Reply via email to