Re: client-side chunked-encoding and certificates



On 09/28/2013 10:51 AM, Dirk-Jan C. Binnema wrote:
- client-side certificates, i.e. the ability to set a
  pkcs#12/pem/... certificate so the server can verify who I am.

As Sergio pointed out, this is something that's been on the to-do list
forever. However, there is a good chance it will finally happen this
release cycle.

(FWIW, I think it might actually be possible to do this with just the
current APIs, with a little bit of work. Using the
SoupMessage:network-event signal, you can get access to the
GTlsConnection, and then you can fiddle with it before or during the
handshake.)

- client-side chunked encoding, i.e., the ability to send data to a
  server in chunks.

This is possible, though not especially clean API-wise. It works the
same way as server-side chunked encoding
(https://developer.gnome.org/libsoup/stable/libsoup-server-howto.html#id-1.2.4.5.8);
you set the encoding with soup_message_headers_set_encoding() before
sending the message, and then add chunks with soup_message_append() /
soup_message_append_buffer(), possibly listening to the wrote-chunk
signal to know when another chunk is needed, and use
soup_message_body_complete() when you're done.

Eventually there will be a GOutputStream-based API for writing the
request body, like the existing GInputStream-based ones for reading the
response. But I'm not sure exactly when that will be.

-- Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]