[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] transfer encoding
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] transfer encoding |
Date: |
Wed, 23 Sep 2015 00:03:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 |
Hi Kay,
If you add that header, *your* application logic must compress the XML,
MHD will not do it for you. You should consult the libz manual for how
to do this, I don't have a good example for doing this with MHD at hand,
but it's not terribly hard either (if you know C).
Happy hacking!
Christian
On 09/22/2015 09:19 PM, Kay Wang wrote:
> Hi,
>
>
>
> I just started to use microhttpd to implement our own web server which only
> supports Get request. What it does is to parse the client request, and
> return to client the response in single file of xml format.
>
>
>
> I wanted the xml response to be transferred using transfer coding, say
> gzip, so I added following line before MHD_queue_response:
>
>
>
> MHD_add_response_header(response, MHD_HTTP_HEADER_TRANSFER_ENCODING, "gzip")
>
>
>
> I am not sure if my http server will really transfer the response in gzip
> by adding this line cause I can’t find the example in on-line help and
> tutorial. Could you please help?
>
>
>
> Thanks,
>
> Kay
>
signature.asc
Description: OpenPGP digital signature