1 2003-10-23 Dan Winship <danw@ximian.com>
3 * libsoup/soup-socket.c (init): Initialize flags to default
6 2003-09-23 Dan Winship <danw@ximian.com>
8 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
9 note whether or not the CA file has been loaded.
10 (SoupGNUTLSChannel): add a "hostname" field.
11 (verify_certificate): Remove the comment about not being able to
12 verify the hostname because of soup problems. Now it's because of
13 GNUTLS problems instead.
14 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
15 and takes a hostname and a creds argument now.
16 (soup_ssl_get_client_credentials,
17 soup_ssl_get_server_credentials): Return client/server credentials
19 (soup_ssl_free_client_credentials,
20 soup_ssl_free_server_credentials): and free them.
22 * libsoup/soup-session.c (class_init, set_property, get_property):
23 add ssl_ca_file property
24 (get_host_for_message): when returning an SSL host for the first
25 time, create a client credentials structure for the session.
26 (run_queue): Pass the ssl creds to the new connection. Also fix an
27 unrelated bug that caused infinite loops on "bad hostname".
29 * libsoup/soup-server.c: Use GObject properties, including
30 ssl_cert_file and ssl_key_file properties.
31 (soup_server_new): Remove "protocol" argument; if the cert file
32 and key file properties were set, create a server credential
33 structure from them and pass that to soup_socket_server_new.
35 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
36 dest_uri to origin_uri to match RFC 2616 terminology. Add an
38 (class_init, set_property, get_property): add SSL_CREDS property
39 (soup_connection_connect_async, soup_connection_connect_sync):
40 Pass ssl_creds to soup_socket_client_new calls.
42 * libsoup/soup-socket.c: Use GObject properties, including an
44 (soup_socket_set_flags): Gone (replaced with boolean properties)
45 (soup_socket_new): Make this take a list of properties
46 (listen_watch): copy ssl creds from listener to new socket
47 (soup_socket_start_ssl): Pass remote hostname and socket creds
48 structure to soup_ssl_wrap_iochannel.
49 (soup_socket_client_new_async, soup_socket_client_new_sync,
50 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
53 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
54 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
55 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
58 * tests/get.c: add a "-c CAfile" argument, for loading a CA
59 certificate file to validate https connections against
61 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
62 arguments for loading an SSL server certificate. Only start an SSL
63 server if those arguments were used.
65 * tests/test-cert.pem:
66 * tests/test-key.pem: SSL certificate for testing simple-httpd
68 * tests/revserver.c: Update for API changes
69 * tests/simple-proxy.c: Likewise
71 2003-09-22 Dan Winship <danw@ximian.com>
73 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
76 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
77 (soup_set_security_policy, soup_get_security_policy): Remove,
78 since the GNUTLS backend doesn't actually implement it.
79 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
81 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
84 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
87 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
88 soup_ssl_get_server_iochannel into a single function that takes a
91 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
92 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
93 (soup_gnutls_set_security_policy): Gone
95 * libsoup/soup-gnutls.h
96 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
99 * libsoup/soup-socket.c: Move soup_sockaddr_max
100 #define here from soup-private.h
101 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
104 * libsoup/soup-private.h: Gone
106 * libsoup/soup-address.c: Fix #includes for soup-private.h and
108 * libsoup/soup-auth-digest.c: Likewise
109 * libsoup/soup-auth.c: Likewise
110 * libsoup/soup-connection-ntlm.c: Likewise
111 * libsoup/soup-connection.c: Likewise
112 * libsoup/soup-dns.c: Likewise
113 * libsoup/soup-gnutls.c: Likewise
114 * libsoup/soup-headers.c: Likewise
115 * libsoup/soup-message-client-io.c: Likewise
116 * libsoup/soup-message-handlers.c: Likewise
117 * libsoup/soup-message-io.c: Likewise
118 * libsoup/soup-message-server-io.c: Likewise
119 * libsoup/soup-message.c: Likewise
120 * libsoup/soup-server-message.c: Likewise
121 * libsoup/soup-server.c: Likewise
122 * libsoup/soup-session.c: Likewise
123 * libsoup/soup-socket.c: Likewise
124 * tests/auth-test.c: Likewise
126 2003-09-19 Dan Winship <danw@ximian.com>
128 * libsoup/soup-address.c (update_address_from_entry): free the
131 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
134 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
135 iochannel initialization. Not sure how this worked before...
137 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
138 from soup_message_prepare (and a few things removed).
140 * libsoup/soup-message-client-io.c (soup_message_send_request):
141 s/soup_message_prepare/soup_message_cleanup_response/
143 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
144 with "\0" on the headers before passing them to the parse
146 (io_read): Call soup_message_cleanup_response after returning an
147 informational response so the data doesn't leak.
149 * libsoup/soup-headers.c (soup_headers_parse): Update for
150 soup-message-io.c:io_read change
152 * libsoup/soup-server.c (soup_server_new,
153 soup_server_new_with_host): Don't leak the SoupAddress.
155 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
157 (set_property): If the proxy uri changes, call
158 soup_session_abort() and cleanup_hosts().
159 (request_finished, final_finished): Fix a bug when requeuing
162 * tests/libsoup.supp: valgrind suppression file for soup tests
164 * tests/Makefile.am (EXTRA_DIST): dist it.
165 (noinst_PROGRAMS): move the former check_PROGRAMS to
166 noinst_PROGRAMS instead.
168 2003-09-18 Dan Winship <danw@ximian.com>
170 * libsoup/soup-message.c: Add wrote_informational and
171 got_informational signals.
173 * libsoup/soup-message-client-io.c (get_request_headers): Set the
174 EXPECT_CONTINUE flag on the message if that header is set.
176 * libsoup/soup-message-server-io.c (parse_request_headers):
179 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
180 when blocking on an expect-continue. Emit wrote_informational
181 instead of wrote_headers in the 1xx case.
182 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
183 reading a 100 Continue response. Emit got_informational instead of
184 got_headers in the 1xx case.
186 * libsoup/soup-session.c (soup_session_send_message): Reorder
187 things to deal with the fact that the message could finish right
188 away if there is a connection available and the server is very
191 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
192 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
194 2003-09-17 Dan Winship <danw@ximian.com>
196 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
197 (one that pruned too little, one that pruned too much).
198 (queue_message): When requeuing, don't run the queue;
199 final_finished will take care of that later.
200 (soup_session_abort): New, to cancel all pending requests.
202 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
203 the socket while waiting for the address to resolve
205 2003-09-17 Dan Winship <danw@ximian.com>
207 * libsoup/soup-connection.c (soup_connection_new): Replaces the
208 three previous soup_connection_new* functions and uses gobject
209 properties to set the destination and proxy uris.
210 (class_init): set up two more signals, authenticate and
212 (soup_connection_send_request): virtualize
213 (send_request): Default implementation
215 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
216 also handles NTLM authentication. Includes all of the NTLM code
217 formerly in soup-auth-ntlm.c.
219 * libsoup/soup-auth-ntlm.[ch]: Gone.
221 * libsoup/soup-auth.c: Remove NTLM refs
223 * libsoup/soup-session.c (class_init): Add gobject properties for
224 proxy, max_conns, use_ntlm. Change the "authenticate" and
225 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
226 can be used for authenticating SoupConnectionNTLM as well, which
227 doesn't use a SoupAuth).
228 (soup_session_new): Renamed from soup_session_new_default.
229 (soup_session_new_with_options): Replaces
230 soup_session_new_with_proxy and soup_session_new_full. Takes
232 (run_queue): Create a new connection of type SoupConnection or
233 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
234 to its authenticate and reauthenticate signals.
235 (connection_authenticate, connection_reauthenticate): proxy these
238 * libsoup/soup-address.c (update_address_from_entry): Fix a
239 crasher when failing to resolve the address.
241 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
242 working before" bugs.
244 * libsoup/soup-message-client-io.c (soup_message_send_request):
245 call soup_message_prepare() to clean up the existing response
248 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
249 when processing an OK EOF.
251 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
252 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
254 * tests/auth-test.c (authenticate, reauthenticate): Update for new
256 (main): Use soup_session_new.
257 * tests/get.c (main): Likewise.
258 * tests/simple-proxy.c (main): Likewise.
260 2003-09-10 Dan Winship <danw@ximian.com>
262 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
264 (invalidate_auth): Remove the call to soup_auth_invalidate.
265 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
266 contain authentication, then emit "authenticate" or
267 "reauthenticate" (depending on whether or not this is the first
268 time we've asked for a password for this auth).
269 (update_auth_internal): If the server rejects our
270 username/password, don't bail out immediately. Try doing a
271 "reauthenticate" first.
273 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
275 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
277 (soup_auth_invalidate): Remove this; it doesn't actually do
278 anything useful for us.
280 * libsoup/soup-auth-basic.c (invalidate): Remove
281 * libsoup/soup-auth-digest.c: (invalidate): Remove
282 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
284 * libsoup/soup-uri.c: Remove all references to "authmech".
285 (soup_uri_set_auth): Remove this too.
287 * tests/auth-test.c: Update to use the "authenticate" and
288 "reauthenticate" signals instead of encoding usernames and
289 passwords in the URIs. Add a few more test cases.
291 2003-09-10 Dan Winship <danw@ximian.com>
293 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
294 "status" field from here, since it's mostly used by SoupSession,
295 which shouldn't need access to SoupMessagePrivate.
297 * libsoup/soup-message.h (SoupMessage): Move it here.
298 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
299 (soup_message_set_uri): also moved from soup-message-private.h
301 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
303 * libsoup/soup-message-handlers.c:
304 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
306 * libsoup/soup-message-io.c (soup_message_io_client,
307 soup_message_io_server, soup_message_io_unpause): Don't set up an
308 idle handler, just jump right in to reading/writing; if this is a
309 synchronous socket, then the caller wants to block, and if it's
310 not, then we'll quickly get an EAGAIN anyway.
312 * libsoup/soup-session.c: (queue_message): Likewise.
313 (*) Update for SoupMessageStatus move and remove
314 soup-message-private.h include.
316 * libsoup/soup-server-message.c: Remove soup-message-private.h
319 * libsoup/soup-server.c: Likewise.
321 * libsoup/soup-connection.c (soup_connection_is_connected,
322 soup_connection_is_new): Remove these, since they weren't being
325 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
326 avoid namespace pollution.
328 * libsoup/soup-auth-digest.c: Update for that.
329 * libsoup/soup-server-auth.c: Likewise
331 * tests/auth-test.c: Remove soup-message-private.h include
333 2003-09-09 Dan Winship <danw@ximian.com>
335 Beginnings of improved synchronous API support
337 * libsoup/soup-dns.c: Simplify this by making it not automatically
338 return the result: force the caller to poll. (This isn't really a
339 performance issue: the results should come back quickly anyway.)
340 Also, make the cache thread-safe.
341 (soup_dns_entry_from_name): Was soup_gethostbyname
342 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
343 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
344 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
345 blocks if it's not resolved yet).
347 * libsoup/soup-address.c: Update for soup-dns changes.
348 (soup_address_new): Don't automatically start resolving the
349 hostname now, since we don't know if the caller is going to want
350 it resolved synchronously or asynchronously.
351 (soup_address_resolve_async): Renamed from soup_address_resolve.
352 (soup_address_resolve_sync): New routine to do blocking
355 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
356 status value directly when connecting synchronously.
357 (soup_socket_client_new_async, soup_socket_client_new_sync):
358 Separate async/sync client socket functions.
359 (soup_socket_get_iochannel): Made static since it was not used
362 * libsoup/soup-connection.c (soup_connection_new,
363 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
364 up the data, don't actually start connecting.
365 (soup_connection_connect_async, soup_connection_connect_sync): New
366 async and sync SoupConnection connecting routines.
367 (soup_connection_get_socket): Remove this since it wasn't being
370 * libsoup/soup-session.c (final_finished): Run the queue since a
371 connection is now freed up.
372 (run_queue): Update for soup_connection_new* changes.
374 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
375 wasn't being used any more.
377 * libsoup/soup-private.h: Remove some prototypes for functions
378 that no longer exist.
380 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
381 (copies the protocol, host, and port of a SoupUri).
385 * tests/simple-proxy.c: belatedly update for soup-session change
387 * tests/revserver.c: Handle each new connection in its own thread,
388 using synchronous SoupSocket calls.
390 2003-09-05 Dan Winship <danw@ximian.com>
392 * libsoup/soup-session.c: Move a bunch of logic here from
393 soup-context. Now the session keeps track of hosts (instead of
394 having a global soup_hosts hash) and their connections.
395 (soup_session_new_with_proxy, soup_session_new_full): New session
396 constructors to specify a proxy or a proxy and connection limits
397 (send_request): Add Authorization and Proxy-Authorization headers
398 before sending off the request.
399 (soup_session_queue_message, et al): Improve the way this works.
400 There's no need to use timeouts to wait for connections to become
401 free; we *know* when they become free.
403 * libsoup/soup-private.h: Remove SoupHost and some other
404 no-longer-used stuff.
406 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
407 soup_set_connection_limit, soup_set_connection_limit): Gone. These
408 are all per-session now.
410 * libsoup/soup-message.c: Remove all SoupContext references
411 (mostly replaced with SoupUri references)
412 (cleanup_message): priv->connect_tag and priv->connection are gone
413 now, so this was just soup_message_io_cancel(). So remove
414 cleanup_message and replace it with that everywhere.
415 (soup_message_disconnect): Gone.
416 (soup_message_set_uri): Replaces soup_message_set_context.
417 (soup_message_set_connection, soup_message_get_connection): Gone
419 * libsoup/soup-message-server-io.c (parse_request_headers):
420 s/soup_message_set_context/soup_message_set_uri/
422 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
423 connect_tag, context, and connection.
425 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
427 * libsoup/soup-context.c: Gone
429 * tests/auth-test.c (identify_auth): update for session/context
432 2003-09-03 Dan Winship <danw@ximian.com>
434 * libsoup/soup-status.h: Renamed from soup-error.h, with types
435 and defines renamed accordingly.
437 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
438 status_code and errorphrase to reason_phrase. Remove errorclass.
439 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
440 as being either "errors" or "not errors", so its semantics are
441 guaranteed to be wrong sometimes.
443 * libsoup/soup-message.c (soup_message_set_status,
444 soup_message_set_status_full): Renamed
446 * libsoup/soup-message-handlers.c
447 (soup_message_add_status_code_handler,
448 soup_message_add_status_class_handler): Rename.
450 * libsoup/soup-session.c (soup_session_send_message): Make this
451 return a status code rather than a status class.
453 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
454 unrelated unused fields (retries, callback, user_data).
458 2003-09-02 Dan Winship <danw@ximian.com>
460 * libsoup/soup-session.c: First draft at the new object to
461 maintain formerly-global state. (Not yet complete; still need to
462 get rid of SoupContext).
464 * libsoup/soup-message-queue.c: Data structure used by SoupSession
466 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
467 some bits went into soup-connection.
469 * libsoup/soup-connection.c (soup_connection_send_request): New,
470 to send a request on a connection. The connection updates its
471 internal state and then hands off to soup_message_send_request.
472 (request_done): Callback set up by soup_connection_send_request.
473 Marks the connection as no-longer-in-use, and disconnects it if
475 (soup_connection_set_in_use, soup_connection_mark_old): No longer
476 needed; the connection takes care of this itself now.
477 (soup_connection_new_proxy): New, to create a new connection that
478 is explicitly marked as being through an HTTP proxy.
479 (soup_connection_new_tunnel): New, to create a new HTTPS
480 connection through a proxy. (Includes the code to send the
483 * libsoup/soup-context.c (try_existing_connections): Don't need to
484 call soup_connection_set_in_use.
485 (try_create_connection): Use soup_connection_new,
486 soup_connection_new_proxy, or soup_connection_new_tunnel as
489 * libsoup/soup-message.c (soup_message_prepare): Replaces
491 (soup_message_queue, soup_message_requeue, soup_message_prepare):
492 Gone. This must be done via a SoupSession now.
493 (soup_message_set_connection): don't need to mark in_use/not
494 in_use. Also, msg->priv->socket is gone now.
495 (soup_message_get_socket): Gone.
497 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
498 Remove references to global handlers.
499 (redirect_handler, authorize_handler): Moved to soup-session.c.
501 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
502 session to shut down now.
504 * libsoup/soup.h: add soup-session.h
506 * libsoup/Makefile.am: updates
508 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
511 2003-08-29 Dan Winship <danw@ximian.com>
513 * libsoup/soup-message-io.c: Major rewrite. There is now only a
514 single IO state object (instead of one for reading and one for
515 writing), and the IO code handles switching back and forth between
516 reading and writing as appropriate (including handling the extra
517 switches needed for "Expect: 100-continue").
518 (soup_message_io_client, soup_message_io_server): The new entry
520 (soup_message_io_cancel): If the caller cancels the IO when we
521 were expecting to read more data, disconnect the socket.
523 * libsoup/soup-message.h (SoupMessageFlags): add
524 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
525 do the special expect-continue handling.
527 * libsoup/soup-message.c: Move all the signal stuff here. Remove
528 the "done_reading" and "done_writing" signals and replace them
529 with a single "finished" signal. (A single signal. Say that 10
531 (soup_message_got_headers, etc): Functions to emit signals.
532 (got_headers, got_chunk, got_body): Default signal methods that
533 call soup_message_run_handlers.
534 (finished): Default signal method that replaces
535 soup_message_issue_callback.
536 ([various]): s/soup_message_issue_callback/soup_message_finished/
537 (soup_message_requeue): There's no soup_message_set_read_callbacks
538 any more, so if the caller requeues while it's still reading, just
540 (soup_message_add_chunk, soup_message_add_final_chunk,
541 soup_message_pop_chunk): Moved here from soup-server-message,
542 although we don't actually quite support using chunked encoding
545 * libsoup/soup-server-message.c (soup_server_message_new): No
546 longer takes a socket argument.
547 (soup_server_message_add_chunk, soup_server_message_get_chunk):
548 Moved into SoupMessage.
550 * libsoup/soup-message-handlers.c (global_handlers): Make these
551 POST_BODY rather than PRE_BODY, so they won't mess up the IO
552 channel when the requeue the message.
553 (soup_message_run_handlers): Don't need to issue the message
554 callback from here any more.
555 (authorize_handler): Just leave the error as 401 or 407 (see
558 * libsoup/soup-message-client-io.c (soup_message_send_request):
559 Replaces soup_message_write_request and
560 soup_message_read_response.
562 * libsoup/soup-message-server-io.c: Parallel to
563 soup-message-client-io.c, this defines the server-side header
565 (soup_message_read_request): Its entry point.
567 * libsoup/soup-server.c: Lots of code moved into
568 soup-message-server-io.c. Update for other changes.
570 * libsoup/soup-queue.c: Update for changes
572 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
573 Don't call soup_socket_disconnect() on an error, just return
574 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
575 signals that will mess up the caller of the read/write function.
577 * libsoup/soup-connection.c (soup_connection_disconnect): When
578 disconnecting the socket, disconnect from its signals first to
579 prevent bad reentrancy.
581 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
582 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
583 anything that SOUP_ERROR_UNATHORIZED and
584 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
585 "transport" errors actually are transport-related.)
587 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
589 * tests/simple-proxy.c: Complicate this a bunch. In particular,
590 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
591 pass the data back to the client in chunked format.
593 2003-08-27 Dan Winship <danw@ximian.com>
595 * libsoup/soup-types.h: New header with typedefs, to avoid
596 #include loops among other headers.
598 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
600 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
602 2003-08-26 Dan Winship <danw@ximian.com>
604 * libsoup/soup-message-client-io.c (soup_message_write_request,
605 soup_message_read_response): Higher-than-soup-message-io-level
606 functions to do client-side IO. (Code that used to be in
608 (get_request_header_cb): Fix a bug in the generation of the Host:
609 header; need to include the port number if it's not the default.
611 * libsoup/soup-message-io.c (soup_message_write,
612 soup_message_write_simple): Take separate user_datas for the get_*
613 callbacks and the done callbacks.
615 * libsoup/soup-queue.c: Update to use soup_message_write_request
616 and soup_message_read_response.
618 * libsoup/soup-connection.c (soup_connection_new): Change the
619 prototype to take a SoupUri and a callback.
621 * libsoup/soup-context.c (try_create_connection,
622 soup_context_connect_cb): Update for soup_connection_new change.
624 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
625 for soup_message_write changes
627 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
630 2003-08-26 Dan Winship <danw@ximian.com>
632 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
633 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
634 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
636 * libsoup/soup-message.c (class_init): set up signals
637 (requeue_read_finished): Update for changes.
639 * libsoup/soup-message-io.c (soup_message_read): Split out
640 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
641 arg to say where to store the message body. Set up
642 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
644 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
645 (read_body_chunk): emit READ_CHUNK.
646 (issue_final_callback): Set r->body. emit READ_BODY.
647 (failed_read): emit READ_ERROR.
648 (soup_message_read_set_callbacks): Disconnect old signal handlers,
650 (soup_message_read_cancel): Disconnect signal handlers.
651 (soup_message_write, soup_message_write_simple): Set up
652 wrote_body_cb and error_cb as signal handlers.
653 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
654 nothing currently ever listens for them. emit WROTE_BODY when
656 (failed_write): emit WRITE_ERROR
658 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
659 soup_queue_read_headers_cb): Split this into two unequal chunks.
660 (read_header_cb only runs the pre-body handlers).
661 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
663 (soup_queue_write_done_cb): Update call to soup_message_read
665 * libsoup/soup-server.c (parse_headers_cb): Renamed from
667 (read_done_cb): Update prototype
668 (start_request): Update soup_message_read call.
670 2003-08-25 Dan Winship <danw@ximian.com>
672 * libsoup/soup-message-io.c (soup_message_read,
673 soup_message_write, soup_message_write_simple): Add a "user_data"
674 arg, pass it to the callbacks.
676 * libsoup/soup-message.c (soup_message_requeue,
677 requeue_read_finished, requeue_read_error): Update for that
679 * libsoup/soup-queue.c: Likewise
681 * libsoup/soup-server.c: Likewise
683 2003-08-25 Dan Winship <danw@ximian.com>
685 * libsoup/soup-message.c (soup_message_new): Take a uri string
686 instead of a context. Also, swap the args (so the method comes
687 before the URI, just like in the protocol).
688 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
689 SoupUri instead of a string
690 (soup_message_set_request, soup_message_set_response): Replace
691 soup_message_new_full.
692 (cleanup_message): Was soup_message_cleanup, but is static now.
693 (queue_message): Do the pre-queuing message cleanup here instead
694 of in soup_queue_message.
695 (soup_message_queue): Set the callback and user_data, then call
697 (requeue_read_error, requeue_read_finished, soup_message_requeue):
699 (soup_message_get_uri): Replaces soup_message_get_context.
701 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
702 part of SoupMessagePrivate now)
704 * libsoup/soup-context.c: #include soup-message-private
705 (soup_context_from_uri): constify the uri arg.
707 * libsoup/soup-queue.c: Various context/uri fixes
708 (proxy_https_connect): Use soup_message_new_from_uri.
709 (soup_queue_message): Drastically simplified since most of the
710 work is in soup-messsage.c:queue_message() now
712 * libsoup/soup-auth-digest.c (compute_response,
713 get_authorization): Use soup_message_get_uri.
715 * libsoup/soup-server-auth.c (parse_digest): Likewise
717 * libsoup/soup-server.c (call_handler): Likewise
719 * tests/simple-httpd.c (server_callback): Likewise.
721 * tests/simple-proxy.c (server_callback): Likewise
723 * tests/get.c (got_url): Likewise.
724 (get_url): Update soup_message_new usage.
726 * tests/auth-test.c: #include soup-message-private. Update for
727 context changes and soup_message_new change.
729 2003-08-22 Dan Winship <danw@ximian.com>
731 * libsoup/soup-message-private.h: New file containing
732 SoupMessagePrivate and some other soup-message-internal
733 types/functions. Also includes the new, expanded SoupMessageStatus
736 * libsoup/soup-message-io.c: Replaces what used to be in
737 soup-transfer, but now all the interfaces take SoupMessages
738 instead of SoupReader/SoupWriter and deal with maintaining
739 msg->priv->{read,write}_state themselves. Fixes up all the
742 * libsoup/soup-message-handlers.c: Move the handler code here,
743 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
744 to make the distinction from SoupHandlerKind clearer.)
746 * libsoup/soup-message.c: Update for soup-message-io and new
747 SoupMessageStatus values. Remove handler code.
748 (soup_message_cleanup): Remove the hack to try to preserve the
749 connection if the message gets cleaned up before it finishes
750 reading. soup_message_requeue handles this in the requeuing case,
751 and there's no especially compelling reason to bother doing it in
752 any other case. (And the soup-message-io api doesn't support
753 having a read operation that's not connected to any message.)
755 * libsoup/soup-private.h: remove SoupMessagePrivate
757 * libsoup/soup-queue.c: Update for soup-message-io and new
758 SoupMessageStatus values.
760 * libsoup/soup-server-message.c: Likewise
762 * libsoup/soup-server.c: Likewise
764 * libsoup/soup-transfer.c: Gone (yay)
766 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
768 2003-08-20 Dan Winship <danw@ximian.com>
770 * libsoup/soup-message.c: Make this a GObject. (Note that since
771 SoupMessage was not refcounted before, it's not really refcounted
773 (soup_message_free): Gone, replaced by g_object_unref
774 (soup_message_copy, soup_message_foreach_remove_header): Remove
775 these, since neither was currently functional.
776 (soup_message_is_keepalive): New utility function to look at
777 HTTP version and request/response headers to decide if a message
778 indicates the connection should be kept alive.
779 (soup_message_set_connection, soup_message_get_connection): New
780 (soup_message_get_socket): New
782 * libsoup/soup-server-message.c: Make this a subclass of
784 (soup_server_message_new): Now takes a SoupServer and SoupSocket
785 (soup_server_message_get_server): New
786 (soup_server_message_set_encoding,
787 soup_server_message_get_encoding): Get/set whether the message
788 should be sent with content-length or chunked encoding
789 (soup_server_message_is_started, soup_server_message_is_finished):
790 Private member accessors.
791 (soup_server_message_add_chunk): Renamed from add_data
792 (soup_server_message_get_chunk): Pops a chunk from the list.
793 (soup_server_message_get_source): Gone
795 * libsoup/soup-server.c: Update for SoupServerMessage changes.
796 (error_cb, write_done_cb): All the cleanup stuff that used to be
797 here happens automatically by unreffing the message now.
798 (get_response_header): Remove some erroneous leftover CGI stuff
799 (issue_bad_request): add "Connection: close" to the response.
800 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
801 with no Host header as per RFC 2616.
803 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
804 (soup_connection_set_in_use): Let the caller set the connection to
805 "not in use" even after the socket has been disconnected.
807 * libsoup/soup-context.c: Use soup_message_get_connection
809 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
810 check on request length, since it was rejecting
811 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
813 * libsoup/soup-queue.c: Use soup_message_get_connection and
814 soup_message_get_socket.
815 (soup_queue_read_done_cb): Use soup_message_is_keepalive
816 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
817 soup_connection_start_ssl
819 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
820 handlers if the socket hasn't been disconnected yet.
822 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
823 reader_read): Fix these so that reader_read will exit properly if
824 the read is cancelled.
826 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
828 * tests/simple-httpd.c (server_callback): set the message to
829 content-length encoding.
830 * tests/simple-proxy.c (server_callback): Likewise
832 2003-08-19 Dan Winship <danw@ximian.com>
834 * libsoup/soup-socket.c (soup_socket_read,
835 soup_socket_read_until, soup_socket_write): New API for doing
836 socket IO. Works both synchronously and asynchronously, and
837 buffers data to prevent the "100 Continue" problem.
838 (soup_socket_set_flag): Replaces formerly-private
839 soup_set_sockopts. (primarily to let the caller turn off
840 SOUP_SOCKET_FLAG_NONBLOCKING).
842 * libsoup/soup-transfer.c (soup_transfer_read,
843 soup_transfer_write, soup_transfer_write_simple): Take a
844 SoupSocket instead of a GIOChannel. Use the new socket IO api.
845 Changed the prototypes of some of the callbacks to be less
848 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
849 soup_connection_get_iochannel.
851 * libsoup/soup-message.c: Fix up for soup-transfer changes
853 * libsoup/soup-queue.c: Likewise
855 * libsoup/soup-server.c: Likewise
857 * tests/revserver.c: A slightly more complicated replacement for
858 timeserver. (Does both reads and writes)
860 2003-08-19 Dan Winship <danw@ximian.com>
862 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
863 configure it, and no one has complained, and it looks like the
864 SOCKS5 auth code doesn't actually work anyway...
866 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
868 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
871 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
873 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
876 2003-08-19 Dan Winship <danw@ximian.com>
878 * libsoup/soup-server.c: Make this a GObject. Remove
879 SoupServerMessage code (to soup-server-message.c). Remove CGI
880 server code (for now?)
881 (soup_server_add_handler, soup_server_remove_handler): Rename
882 (from register/unregister) to make it clearer what they do.
884 * libsoup/soup-server-message.c: Moved out of soup-server.c
886 * libsoup/soup-private.h: Remove SoupServer def
888 * libsoup/Makefile.am (libsoupinclude_HEADERS,
889 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
891 * tests/simple-httpd.c:
892 * tests/simple-proxy.c: Update for SoupServer changes
894 2003-08-18 Dan Winship <danw@ximian.com>
896 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
897 a struct sockaddr again (like it used to be). In particular, add
898 back the "port" field. Add a bunch of macros to try (and fail) to
899 simplify some of the code.
900 (soup_address_new): Now returns a SoupAddress directly rather than
901 a random handle, and the caller can just use g_object_unref to
902 cancel the lookup. Also, the callback now uses a
903 SoupKnownErrorCode rather than a special-purpose address-lookup
905 (soup_address_new_cancel): No longer needed.
906 (soup_address_new_sync): Removed
907 (soup_address_new_any): Replaces soup_address_ipv4_any and
908 soup_address_ipv6_any.
909 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
911 (soup_address_get_physical): Renamed from
912 soup_address_get_canonical_name.
913 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
915 * libsoup/soup-socket.c: Update for SoupAddress changes and make
916 similar changes here.
917 (soup_socket_new): Just creates a generic SoupSocket now.
918 (soup_socket_connect): Client setup
919 (soup_socket_listen): Server setup. Now also sets up an iochannel
920 listening for connects and emits a "new_connection" signal as they
922 (soup_socket_start_ssl): Turns on SSL.
923 (soup_socket_client_new, soup_socket_server_new): Utility
924 functions that wrap the above.
925 (soup_socket_new_cancel, soup_socket_new_sync): Gone
926 (soup_socket_server_accept, soup_socket_server_try_accept): No
928 (soup_socket_get_iochannel): No longer adds a ref when returning
929 the iochannel. Also, we set it to "close_on_unref" so that if a
930 caller adds a ref to it, the connection will actually remain open
931 even after the SoupSocket is destroyed.
932 (soup_socket_get_local_address, soup_socket_get_remote_address):
933 Let the caller get both of these.
935 * libsoup/soup-connection.c: Don't keep a private copy of the
937 (soup_connection_new): Don't need to set socket options here.
939 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
940 (soup_connection_get_iochannel): Just return the socket's
941 iochannel (and don't ref it)
943 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
944 SOUP_ERROR_CANT_RESOLVE_PROXY
946 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
947 Remove the "FIXME add a CANT_RESOLVE error" and return
948 SOUP_ERROR_CANT_RESOLVE instead.
950 * libsoup/soup-server.c: Update for socket/address changes. Don't
951 poke into SoupSocket's private fields.
952 (soup_server_run_async): Just connect to the socket's
953 "new_connection" signal.
955 * libsoup/soup-context.c (try_create_connection,
956 soup_context_connect_cb): Update for socket changes. Replace
957 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
959 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
960 to connect to a signal handler and connect another function to
961 clean up the first signal handler after its first invocation.
962 (Lets us use signals to replace one-off callbacks.)
964 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
965 actually private now.
966 (struct _SoupServer): Remove accept_tag.
968 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
969 Don't unref the iochannel.
970 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
972 * libsoup/soup-socks.c: Update for socket/address changes
974 * tests/simple-httpd.c (main):
975 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
976 * tests/simple-proxy.c (main): Likewise
978 * tests/timeserver.c: Update for SoupSocket's "new_connection"
979 signal, and for SoupAddress changes.
981 2003-08-14 Dan Winship <danw@ximian.com>
983 * libsoup/soup-connection.c: New, split out from soup-context and
985 (soup_connection_disconnect): Disconnects the connection and emits
986 a signal. (Replaces the old "keep_alive" flag.)
987 (soup_connection_is_connected): Checks if the connection is still
989 (connection_died): Just disconnect, rather than freeing the
990 connection. This way if anyone else is still referencing it they
991 won't end up with an invalid pointer.
993 * libsoup/soup-context.c: Make this a GObject, remove all the
994 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
995 SoupContext can keep track of connection auth stuff there without
996 SoupConnection needing to care. Various other updates.
998 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
1001 * libsoup/*.c, tests/get.c: Update for context/connection changes
1003 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
1004 definition to deal with the fact that there's no
1005 soup_connection_get_context any more.
1007 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
1008 with connection persistence here.
1009 (soup_queue_read_done_cb): Do it here instead. Disconnect the
1010 connection when appropriate.
1011 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
1012 Reference-count the connection properly. (I think.)
1014 * libsoup/soup-marshal.list: New, for SoupConnection's
1015 "disconnected" signal.
1017 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
1019 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
1020 GLIB_GENMARSHAL gets set too.
1022 2003-08-14 Dan Winship <danw@ximian.com>
1024 * libsoup/soup-error.c: Fix a spelling mistake.
1026 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
1028 2003-08-12 Dan Winship <danw@ximian.com>
1030 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
1031 of the interfaces around a little bit.
1033 * libsoup/soup-auth-basic.c: subclass for Basic auth
1035 * libsoup/soup-auth-digest.c: subclass for Digest auth
1037 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
1038 the code from soup-ntlm.c here, and make it private.
1040 * libsoup/soup-ntlm.c: gone
1042 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
1043 here, and change the signature of SoupAuthorizeFn.
1045 * libsoup/soup-context.c: Use g_object_unref to free auths, use
1046 methods instead of directly access private fields.
1048 * libsoup/soup-queue.c: Likewise
1050 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
1051 NTLM references. We have no plans to implement server-side NTLM
1054 * tests/auth-test.c (identify_auth): Update for auth api changes
1056 2003-08-12 Dan Winship <danw@ximian.com>
1058 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
1061 * libsoup/soup-address.c: Make this a GObject.
1062 (soup_address_ref, soup_address_unref): Gone.
1063 (soup_address_copy): Gone. Wasn't being used anyway.
1065 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
1066 here from soup-address.c, so that soup-address doesn't need to
1067 worry about trying to cache zero-ref addresses.
1069 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
1070 consistently for port numbers.
1071 (soup_socket_ref, soup_socket_unref): Gone.
1073 * libsoup/soup-private.h: Change the SoupSocket definition to be
1074 SoupSocketPrivate. (Still need to keep this here since soup-server
1075 pokes around in its internals.)
1076 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
1078 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
1079 reader/writer rather than leaking them.
1081 * libsoup/*: Use GObject methods for socket/address refcounting
1083 * tests/auth-test.c (main)
1084 * tests/timeserver.c (main): Call g_type_init.
1086 * tests/get.c (main): Call g_type_init.
1087 (get_url, got_url): Fix some bugs that could make -r mode get into
1088 infinite loops downloading the same files over and over. Plug some
1089 memory leaks to make this more useful for valgrinding libsoup.
1091 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
1092 handler for SIGINT so we can exit cleanly, since valgrind won't
1093 give a leak report if you don't. Plug a few memory leaks.
1095 * tests/simple-proxy.c (main): Likewise
1097 2003-08-12 Dan Winship <danw@ximian.com>
1099 Pull over some new test programs from the soup-refactoring branch,
1100 along with the SoupUri changes they depend on.
1102 * tests/simple-httpd.c: A really simple HTTP server, to test the
1105 * tests/simple-proxy.c: An even simpler HTTP proxy
1107 * tests/get.c: Add "-r" flag to recursively get files (thereby
1108 testing multiple-connections-at-once code). Also good for setting
1109 up a tree to use with simple-httpd.
1111 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
1114 * tests/uri-parsing.c: Regression test for the new soup-uri.c
1116 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
1117 pull in some optimizations from camel-url. Also, make SoupProtocol
1118 a GQuark so we can still compare them with ==, but we can also
1119 recognize any protocol.
1120 (soup_uri_new_with_base): New, to merge base and relative URIs
1121 (soup_uri_to_string): Update this. Change the "show_password" flag
1122 (which we always passed FALSE for) to "just_path", for places that
1123 want the path+query without the protocol, host, etc.
1125 * libsoup/soup-queue.c (soup_get_request_header): Just use
1126 soup_uri_to_string to generate the request URI.
1128 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
1129 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
1130 the URI by hand badly.
1131 * libsoup/soup-server-auth.c (parse_digest): Likewise
1133 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
1134 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
1137 * libsoup/soup-context.c (soup_context_uri_hash,
1138 soup_context_uri_equal): s/querystring/query/
1140 2003-08-12 Dan Winship <danw@ximian.com>
1142 * configure.in: Bump API version to 2.2 and package version to
1143 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
1144 libgnutls-config to find GNUTLS.
1146 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
1148 * Makefile.am: Update for pc file rename
1150 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
1151 and libsoup-ssl-proxy stuff.
1153 * libsoup/soup-ssl-proxy.c
1154 * libsoup/soup-nss.[ch]
1155 * libsoup/soup-openssl.[ch]: gone
1157 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
1159 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
1160 auth_test_LDADD): Update libsoup version
1162 2003-08-07 Dan Winship <danw@ximian.com>
1164 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
1165 soup_auth_invalidate): These are all really SoupContext functions,
1166 so move them to soup-context.c (and rename them appropriately).
1167 (soup_auth_get_protection_space): New method to get the
1168 "protection space" of an auth (paths where it is valid).
1169 (soup_auth_invalidate): New method to try to un-authenticate an
1170 auth (so we can keep the domain info cached even if the auth info
1172 (basic_pspace_func): Basic protection space is all directories
1173 below the current one.
1174 (basic_invalidate_func): Clear the encoded username/password
1175 (digest_pspace_func): Digest protection space is either the whole
1176 server, or "what the domain parameter says" (though we don't deal
1177 with cross-host domains).
1178 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
1180 (digest_parse_func, digest_free): Set/free domain parameter
1181 (ntlm_pspace): NTLM protection space is always the whole server.
1182 (ntlm_invalidate): Clear the auth state.
1183 (soup_auth_new_ntlm): Make this non-static
1184 (SoupAuth): Replace the quad-state "status" field with an
1185 "authenticated" boolean.
1187 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
1188 hash with separate "auth_realms" (path->realm) and "auths"
1189 (realm->auth) hashes. Also add a "use_ntlm" flag.
1191 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
1193 (connection_free): Don't the connection's auth, just free it.
1194 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
1195 does two-stage lookup (path->realm then realm->auth) and also
1196 deals with NTLM hacks.
1197 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
1198 but also large parts of authorize_handler. Updates the auth hashes
1199 based on information from a 401 or 407 response. Does a better job
1200 than authorize_handler did of not throwing away good information.
1201 (soup_context_preauthenticate): New; fakes up auth info so that
1202 requests will end up using authentication without the server
1203 needing to return an error first.
1204 (soup_context_authenticate_auth): Moved out of authorize_handler
1205 so it can be used at request-sending time too, if we know that we
1206 need it. (That way we can avoid requeuing the request if it isn't
1207 going to be able to be authenticated.)
1208 (soup_context_invalidate_auth): Sort of like the old
1209 soup_auth_invalidate, but only destroys the auth data, while still
1210 remembering the path->realm mapping.
1212 * libsoup/soup-message.c (authorize_handler): Mostly moved into
1213 soup_context_update_auth.
1214 (maybe_validate_auth): Remove this; it was only useful because of
1215 bugs elsewhere in the auth handling.
1217 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
1218 soup_context_lookup_auth. If the returned auth isn't
1219 authenticated, call soup_context_authenticate_auth() on it.
1221 * tests/auth-test.c: New (from soup-refactoring branch). Tests
1222 that the Basic/Digest auth code does the right thing. (TODO: find
1223 a good way to add NTLM tests too.)
1225 * tests/Makefile.am (check_PROGRAMS): add auth-test
1227 2003-07-29 Dan Winship <danw@ximian.com>
1229 * configure.in: 1.99.25 ("Potato and Leek Soup")
1231 * libsoup/soup-message.c (requeue_read_finished,
1232 release_connection): Free the passed-in body data. Otherwise the
1233 response body ends up getting leaked on most 3xx and 4xx
1235 (soup_message_cleanup): Remove a piece of code that didn't
1236 actually do anything and its associated confused comment.
1238 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
1240 * libsoup/soup-context.c (connection_free): plug a non-occasional
1243 2003-06-26 Joe Shaw <joe@ximian.com>
1245 * configure.in: Version 1.99.24
1247 2003-06-24 Dan Winship <danw@ximian.com>
1249 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
1250 it, and (b) depends on lots of new things sometimes (like on RH9).
1252 * libsoup/soup-openssl.c:
1253 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
1254 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
1257 2003-06-19 Dan Winship <danw@ximian.com>
1259 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
1260 old read_tag before changing/clearing it.
1261 (soup_queue_write_done_cb): Likewise with the write_tag.
1263 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
1264 around the stop+callback.
1265 (soup_transfer_write_cb): Likewise.
1267 2003-06-12 Dan Winship <danw@ximian.com>
1269 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
1271 (soup_transfer_read, create_writer): Set initial ref_count to 2
1272 (one for soup-transfer, one for the caller).
1273 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
1275 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
1276 drops soup-transfer's ref.
1277 (soup_transfer_read_cancel): Now just a stop+unref
1278 (soup_transfer_write_ref, soup_transfer_write_unref,
1279 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
1281 * libsoup/soup-message.c (soup_message_cleanup): when setting up
1282 the "finish reading" callbacks, unref the reader so it will be
1283 destroyed once it's done reading.
1284 (soup_message_requeue): Likewise.
1286 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
1287 prototype change (no longer returns a SoupTransferDone).
1288 (soup_queue_read_chunk_cb): Likewise.
1290 * libsoup/soup-server.c (read_headers_cb): Likewise
1292 2003-06-11 Dan Winship <danw@ximian.com>
1294 * libsoup/soup-transfer.c: Change all functions to take a
1295 SoupReader * or SoupWriter * instead of a guint.
1297 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
1298 write_tag pointers instead of guints.
1300 2003-06-02 Chris Toshok <toshok@ximian.com>
1302 * libsoup/soup-ssl.c: remove #include for soup-nss.h
1304 2003-06-02 Chris Toshok <toshok@ximian.com>
1306 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
1307 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
1308 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
1310 2003-06-02 Chris Toshok <toshok@ximian.com>
1312 * configure.in: Bump version to 1.99.23.
1314 2003-05-30 Chris Toshok <toshok@ximian.com>
1316 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
1317 reconnect when there's an error with ssl connection. This fixes
1318 #43387, but it runs the risk of sending requests multiple times to
1319 the exchange server, and it results in lots of shorter lived
1320 connections and more forking (in the ssl proxy case), depending on
1321 the length of the operation.
1323 2003-05-21 Dan Winship <danw@ximian.com>
1325 * configure.in: 1.99.22 (codename: French Onion Soup)
1327 2003-05-20 Dan Winship <danw@ximian.com>
1329 * libsoup/soup-message.c (soup_message_requeue): Clear the
1330 write_tag as well so we don't double-cancel it. #43395.
1332 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
1333 be destroyed by the end of the func, so we have to call
1334 soup_connection_set_used at the beginning.
1336 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
1337 Call g_set_error() so that we don't SEGV immediately after
1338 returning G_IO_STATUS_ERROR.
1340 2003-05-08 Joe Shaw <joe@ximian.com>
1342 * configure.in: Bump version to 1.99.21
1344 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
1345 tunnelling fails, the other message which shares our same
1346 connection will free it first, so set ours to NULL.
1348 2003-05-08 Dan Winship <danw@ximian.com>
1350 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
1351 return an NTLM request string. Otherwise return the "response"
1352 field (which should include the NTLM authenticate message)
1353 (ntlm_init): Don't bother setting "response" to the NTLM request
1354 string. Just leave it NULL in that case.
1356 * libsoup/soup-message.c (authorize_handler): Never try to reuse
1357 an NTLM auth returned from soup_auth_lookup. Only set the auth on
1358 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
1359 call soup_auth_set_context() on it just like for non-NTLM auth.
1360 The net effect of all of this is that now we record when a context
1361 needs NTLM auth just like with non-NTLM auth, so that that info
1362 gets preserved across connections.
1363 (soup_message_requeue): No longer need the hackery here to
1364 preserve the connection auth state.
1366 2003-05-07 Dan Winship <danw@ximian.com>
1368 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
1369 toggle the connection's in_use flag, and set up the death watch
1370 when it's not in use.
1371 (connection_death): This is only hooked up when the connection is
1372 not in use now, so don't need to check that. Should fix the
1373 infinite connection_death loop.
1374 (soup_connection_is_new): Keep a distinct "new" flag rather than
1375 defining "new" as "has been released at least once".
1376 (soup_connection_set_used): Mark a connection no-longer new.
1377 (soup_context_connect_cb): Mark the connection as new. Don't set
1378 up the death watch since it's in_use.
1379 (try_existing_connections): Use soup_connection_set_in_use.
1380 (soup_connection_release): Likewise
1382 * libsoup/soup-message.c (requeue_read_finished): Call
1383 soup_connection_set_used so that the connection isn't still
1384 considered new when we send the message the second time.
1386 * libsoup/soup-queue.c (soup_queue_error_cb): Call
1387 soup_connection_set_used (assuming we don't close the connection)
1388 (soup_queue_read_done_cb): Likewise.
1390 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
1391 nothing, call soup_transfer_read_error_cb rather than just
1392 cancelling, or else it will get cancelled again later.
1394 2003-05-07 Dan Winship <danw@ximian.com>
1396 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
1397 library doesn't depend on them, only the proxy does. #42473
1399 2003-05-06 Dan Winship <danw@ximian.com>
1401 * src/libsoup/soup-message.c (global_handlers): Change the
1402 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
1403 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
1404 for "Location" to get around the non-64-bit-clean union
1405 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
1406 (redirect_handler): Update for that.
1408 2003-04-28 Dan Winship <danw@ximian.com>
1410 * configure.in: 1.99.20
1412 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
1413 we always call UNIGNORE_CANCEL. Might fix #41971
1415 2003-04-25 Dan Winship <danw@ximian.com>
1417 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
1418 suddenly gets an io error while reading or writing, assume it's a
1419 timeout or something, close the connection, and requeue the
1422 2003-04-23 Dan Winship <danw@ximian.com>
1424 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
1425 soup-transfer callbacks to keep reading off the connection unless
1426 we're actually going to keep the connection around afterward.
1427 Otherwise we can just close it.
1429 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
1430 thingy so that it's possible to cancel a read from inside a
1431 callback so that the above change actually works instead of just
1434 2003-04-20 Rodney Dawes <dobey@ximian.com>
1436 * configure.in: Up version to 1.99.18
1437 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
1439 2003-04-11 Dan Winship <danw@ximian.com>
1441 * libsoup/soup-context.c (soup_connection_purge_idle): New
1442 function to close all idle connections. (Needed for #41117 or else
1443 there's no way to force-discard NTLM authentication.)
1445 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
1447 2003-04-10 Joe Shaw <joe@ximian.com>
1449 * libsoup/soup-queue.c (proxy_https_connect):
1450 proxy_https_connect_cb() might not get called if connecting to the
1451 proxy fails, and it causes us to double-free the connection.
1452 Always set the message's connection to NULL before freeing it.
1454 2003-04-09 Dan Winship <danw@ximian.com>
1456 * configure.in: 1.99.17
1458 2003-04-07 Dan Winship <danw@ximian.com>
1460 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
1461 We can't release the connection there because there may be
1462 SoupMessages still pointing to it. (Needs to be revisited.)
1464 2003-04-03 JP Rosevear <jpr@ximian.com>
1466 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
1467 error during waitpid
1469 * libsoup/soup-address.c: ditto
1471 2003-04-02 Joe Shaw <joe@ximian.com>
1473 * libsoup/soup-context.c (connection_death): Only drop the
1474 connection if we get an error condition on the channel. Fixes a
1477 2003-04-02 Joe Shaw <joe@ximian.com>
1479 * libsoup/soup-context.c (connection_death): Just call
1480 soup_connection_release() from here and return whether the
1481 connection is in use.
1483 2003-03-31 Ian Peters <itp@ximian.com>
1485 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
1486 case of EAGAIN or EINTR, since shutting down an SSL connection
1487 requires more than just closing a socket.
1489 2003-03-28 Dan Winship <danw@ximian.com>
1491 * libsoup/soup-message.c (soup_message_set_context): If the new
1492 context points to a different server from the old context, call
1493 soup_message_cleanup. Otherwise it tries to reuse the old
1496 2003-03-25 Joe Shaw <joe@ximian.com>
1498 * configure.in: Bump up to 1.99.16
1500 2003-03-24 Joe Shaw <joe@ximian.com>
1502 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
1503 slightly better error message on various SSL failures than the
1506 * soup-queue.c (soup_queue_error_cb): Throw the
1507 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
1509 2003-03-21 Joe Shaw <joe@ximian.com>
1511 * soup-server.c: Use non-deprecated g_main_loop_* calls
1513 (soup_server_unref): Don't unref the main loop if it's NULL.
1514 Fixes a glib warning.
1516 2003-03-18 Dan Winship <danw@ximian.com>
1518 * configure.in: comment out NSS checks. The NSS code doesn't work
1519 and there are no current plans to fix it.
1521 * README (Features): Mention GnuTLS, remove NSS and the rest of
1522 the "Planned Features" section.
1524 * MAINTAINERS: remove Alex
1526 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
1527 timeout to 10 seconds (and get rid of the 3 tries) so we don't
1528 fail to connect just because the server is slow/far away.
1530 2003-03-17 Joe Shaw <joe@ximian.com>
1532 * configure.in: Bump up to 1.99.15.
1534 2003-03-12 Ian Peters <itp@ximian.com>
1536 * libsoup/soup-gnutls.c: because creating client credentials is
1537 expensive, keep the same one around as long as possible, only
1538 recreating it if the ssl_ca_file changes. Wrap
1539 gnutls_certificate_credentials in a refcounted struct to avoid
1540 freeing it while another established connection may potentially
1541 need it (say, to rehandshake).
1543 2003-03-11 Frank Belew <frb@ximian.com>
1545 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
1548 2003-03-10 Joe Shaw <joe@ximian.com>
1550 * configure.in: Bump up to 1.99.14.
1552 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
1553 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
1556 2003-03-07 Joe Shaw <joe@ximian.com>
1558 * configure.in: Bump up to 1.99.13.
1560 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
1561 the list of conditions to watch. If the remote end hangs up the
1562 connection, we'll get a successful read of 0 bytes, not a HUP.
1563 The connection will have to be released by the point we check for
1564 it in connection_death().
1566 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
1567 (apparently) errant resetting of the read and write tags. I think
1568 this might have been causing some reentrancy and crashes.
1570 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
1571 channel to NULL encoding and not buffered.
1573 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
1576 2003-02-28 Joe Shaw <joe@ximian.com>
1578 * configure.in: Bump up to 1.99.12.
1580 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
1581 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
1582 this case we probably don't want to call the error callback, we
1583 just want to act like our transfer was cancelled.
1585 2003-02-27 Joe Shaw <joe@ximian.com>
1587 Try to apply some order to the iochannel refcounting...
1589 * configure.in: Bump up to 1.99.11.
1591 * libsoup/soup-context.c (soup_connection_get_iochannel): The
1592 connections needs to own a reference to the iochannel! If we're
1593 using HTTPS, release the ref we get from soup_socket_get_iochannel
1594 and replace it with the ref we get from soup_ssl_get_iochannel().
1595 Then, always ref the channel that we return (ugh, but that's the
1597 (connection_free): Release the connection's ref to the iochannel.
1599 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
1600 iochannel. The reference we pass back will be owned by the
1602 (soup_ssl_hup_waitpid): Release our ref.
1604 2003-02-27 Joe Shaw <joe@ximian.com>
1606 * configure.in: Bump up to 1.99.10.
1608 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
1609 iochannel, return to the status quo. Sigh.
1611 2003-02-26 Joe Shaw <joe@ximian.com>
1613 * configure.in: Bump up to 1.99.9.
1615 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
1616 it's causing problems with HTTPS and proxies; the iochannel
1617 refcounting is waaaaaay horked.
1619 2003-02-26 Frank Belew <frb@ximian.com>
1621 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
1623 2003-02-11 Joe Shaw <joe@ximian.com>
1625 * configure.in: Bump up to 1.99.8 for snaps.
1627 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
1628 It returns the address to the resulting hostent or NULL on failure,
1629 unlike Linux which returns an error code.
1631 2003-02-11 Joe Shaw <joe@ximian.com>
1633 * configure.in: Bump up to 1.99.7 for snaps.
1635 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
1636 the error string from OpenSSL if we can't establish a connection.
1638 2003-02-04 Joe Shaw <joe@ximian.com>
1640 * configure.in: Bump up to 1.99.6 for snaps.
1642 * libsoup/soup-server.c (destroy_message): We already assigned
1643 chan, so don't reassign it, and unref it in all cases.
1644 (issue_bad_request): Always unref after a call to
1645 soup_socket_get_iochannel(), because it refs it.
1646 (conn_accept): Fix some funky GIOChannel reffing here.
1648 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
1649 g_io_channel_ref() on the socket. This is the exact opposite of
1650 what we want to do. Create a temporary structure containing the
1651 parent pid and the old socket and unref the socket when our
1652 callback is called. This should fix GIOChannels being leaked on
1655 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
1658 2003-01-22 Joe Shaw <joe@ximian.com>
1660 * configure.in: Bump up to 1.99.5 for the snaps.
1662 * libsoup/soup-address.c (soup_address_new): If we found the
1663 address in our hash, we need to return NULL or else Soup will
1664 think we're doing an async lookup and do some cancellation on
1665 us. Besides, we were returning the wrong type anyway and it
1666 was crashing things.
1668 2003-01-17 Joe Shaw <joe@ximian.com>
1670 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
1671 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
1672 out, so keep trying until we succeed.
1674 2003-01-10 Joe Shaw <joe@ximian.com>
1676 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
1677 strings and print out the error when the cert can't verify.
1679 2003-01-09 Dan Winship <danw@ximian.com>
1681 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
1682 overrun noticed by valgrind
1684 2002-12-20 Joe Shaw <joe@ximian.com>
1686 * libsoup/soup-server.c (soup_server_new_with_host): Added.
1687 Starts a server only on the interface specified, instead of all
1690 2002-12-16 Jeremy Katz <katzj@redhat.com>
1692 * configure.in: use $libdir instead of /usr/lib when looking for
1695 2002-12-11 Joe Shaw <joe@ximian.com>
1697 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
1698 Don't set a variable to NULL and then immediately try to
1701 2002-12-09 Joe Shaw <joe@ximian.com>
1703 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
1704 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
1705 we don't hang forever if we don't get more data.
1707 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
1708 or else we'll hang forever in SSL_connect() if the other side
1711 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
1712 release the connection on message free, even if the connection was
1715 2002-12-03 Joe Shaw <joe@ximian.com>
1717 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
1718 g_io_channel_set_close_on_unref() on the second half of the socket
1719 pair so we don't leak file descriptors.
1721 2002-12-03 Frank Belew <frb@ximian.com>
1723 * libsoup/soup-address.c: add signal.h to the list of headers to
1726 2002-11-25 Joe Shaw <joe@ximian.com>
1728 * Makefile.am: Build the tests directory again
1730 2002-11-21 Rodney Dawes <dobey@ximian.com>
1732 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
1734 2002-11-20 Michael Meeks <michael@ximian.com>
1736 * configure.in: require autoconf 2.52 not 2.53.
1738 2002-11-18 Dan Winship <danw@ximian.com>
1740 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
1741 since it's apparently non-portable. Use s6_addr instead.
1742 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
1744 * libsoup/soup-error.c: Fix spelling of
1745 SOUP_ERROR_MOVED_PERMANENTLY and its description.
1747 * libsoup/soup-message.c (soup_message_get_request_header, etc):
1748 Remove long-deprecated API.
1750 * libsoup/soup-socket.c (soup_socket_connect): remove unused
1753 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
1754 * libsoup/soup-server.c (cgi_read): Likewise
1755 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
1757 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
1758 * libsoup/soup-transfer.c (soup_transfer_read_cb,
1759 soup_transfer_write_cb): Likewise.
1761 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
1762 instead of IPv4. (Tested on OS X.)
1764 2002-11-15 Dan Winship <danw@ximian.com>
1766 * libsoup/*: Change old Helix Code refs to Ximian (and update
1769 2002-11-15 Frank Belew <frb@ximian.com>
1771 * tests/Makefile.am: uncomment lines to make timeserver build
1774 2002-11-14 Joe Shaw <joe@ximian.com>
1776 * libsoup/soup-address.c (soup_address_new): When we get an
1777 address from the hash, call our address lookup callback or else
1778 the connection will hang.
1780 2002-11-13 Dan Winship <danw@ximian.com>
1782 * tests/timeserver.c: Oops, commit this.
1784 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
1786 2002-11-13 Joe Shaw <joe@ximian.com>
1788 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
1789 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
1792 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
1793 to properly shut down the SSL connection before closing the
1796 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
1797 iochannels before quitting the main loop.
1799 * tests/Makefile.am: disable building timeserver, the source file
1802 2002-11-12 Dan Winship <danw@ximian.com>
1804 * configure.in: Check for IPv6 support in networking headers.
1806 * libsoup/soup-address.c: Make the internal structure of
1807 SoupAddress entirely private, and make SoupAddress be more like a
1808 hostent and less like a sockaddr. (Ie, make it not have a port
1809 associated with it.) Document undocumented functions. Add
1810 completely-untested support for IPv6.
1811 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
1812 SoupAddress and a port.
1813 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
1814 addresses corresponding to the IPv6 and IPv6 "any" addresses.
1815 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
1816 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
1817 may be a sockaddr_in or sockaddr_in6.
1818 (soup_address_gethostname, soup_address_gethostaddr): Remove
1819 these. They aren't reliable, especially on multihomed hosts.
1820 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
1821 (soup_address_new): Keep pending lookups in a separate hash table
1822 from completed lookups. Fix a bug when canceling a lookup when
1823 there was more one outstanding request for it.
1824 (soup_address_lookup_in_cache): Removed.
1826 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
1827 it's not in SoupAddress any more).
1828 (soup_socket_connect): Simplify this. Don't use
1829 soup_address_lookup_in_cache, just call soup_address_new, since we
1830 already know the code can deal with the callback being invoked
1832 (soup_socket_new_sync, soup_socket_new): Take a port argument.
1833 (soup_socket_server_new): Take a SoupAddress to use as the local
1834 address to bind to. This lets the caller choose between the IPv4
1835 and IPv6 "any" addresses, and also lets you bind to a single
1836 interface of a multi-homed machine.
1837 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
1840 * libsoup/soup-server.c (soup_server_new): Pass
1841 soup_address_ipv4_any() to soup_socket_server_new().
1843 * libsoup/soup-socks.c (soup_connect_socks_proxy,
1844 soup_socks_write): Fix up for the API changes, but it won't work
1847 * tests/timeserver.c: Another really simple test, for the server
1850 * tests/Makefile.am: build timeserver
1852 2002-11-11 Dan Winship <danw@ximian.com>
1854 * libsoup/soup-address.c: Move the SoupAddress code from
1855 soup-socket.c and soup-socket-unix.c to here.
1857 * libsoup/soup-socket.c: Move the remaining code from
1858 soup-socket-unix.c here.
1860 * libsoup/soup-socket-unix.c: Gone
1862 * tests/get.c: really really trivial test program
1864 * configure.in (AC_OUTPUT):
1865 * Makefile.am (SUBDIRS): add tests/
1867 2002-11-05 Dan Winship <danw@ximian.com>
1869 * Split libsoup out of soup. ChangeLog.old contains the original
1872 * Makefile.am, etc: Fix things up to work with the new directory
1873 layout. Disable docs until we fix them.
1875 * autogen.sh: Use gnome-autogen.sh
1877 * configure.in: Require autoconf 2.53. Remove stuff that was only
1878 needed for httpd or wsdl code. Remove glib1 support. Bump version
1881 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
1882 in ${includedir}/soup-2.0
1884 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
1885 SOAP-specific stuff, Windows support, and other things that
1886 weren't being maintained.
1888 * soup-config.in, soupConf.sh: Kill these. We only support