Method
SoupMessageHeadersset_content_length
Declaration [src]
void
soup_message_headers_set_content_length (
SoupMessageHeaders* hdrs,
goffset content_length
)
Description [src]
Sets the message body length that hdrs
will declare, and sets
hdrs
‘s encoding to SOUP_ENCODING_CONTENT_LENGTH
.
You do not normally need to call this; if hdrs
is set to use
Content-Length encoding, libsoup will automatically set its
Content-Length header for you immediately before sending the
headers. One situation in which this method is useful is when
generating the response to a HEAD request; Calling
soup_message_headers_set_content_length()
allows you to put the
correct content length into the response without needing to waste
memory by filling in a response body which won’t actually be sent.