1 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
3 * libsoup/soup-soap-message.[ch]: new class to make it easier to
6 * libsoup/Makefile.am: added new files.
8 * configure.in: increased version number.
10 2003-10-24 Joe Shaw <joe@ximian.com>
12 * libsoup/soup-address.c (update_address_from_entry): Call
13 soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
14 one in addr->priv->lookup. Fixes a crash on synchronous DNS
17 * libsoup/soup-server.c (soup_server_new): We need to ref the
18 address we're binding to, because soup_socket_get_local_address()
21 2003-10-23 Dan Winship <danw@ximian.com>
23 * libsoup/soup-socket.c (init): Initialize flags to default
26 2003-09-23 Dan Winship <danw@ximian.com>
28 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
29 note whether or not the CA file has been loaded.
30 (SoupGNUTLSChannel): add a "hostname" field.
31 (verify_certificate): Remove the comment about not being able to
32 verify the hostname because of soup problems. Now it's because of
33 GNUTLS problems instead.
34 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
35 and takes a hostname and a creds argument now.
36 (soup_ssl_get_client_credentials,
37 soup_ssl_get_server_credentials): Return client/server credentials
39 (soup_ssl_free_client_credentials,
40 soup_ssl_free_server_credentials): and free them.
42 * libsoup/soup-session.c (class_init, set_property, get_property):
43 add ssl_ca_file property
44 (get_host_for_message): when returning an SSL host for the first
45 time, create a client credentials structure for the session.
46 (run_queue): Pass the ssl creds to the new connection. Also fix an
47 unrelated bug that caused infinite loops on "bad hostname".
49 * libsoup/soup-server.c: Use GObject properties, including
50 ssl_cert_file and ssl_key_file properties.
51 (soup_server_new): Remove "protocol" argument; if the cert file
52 and key file properties were set, create a server credential
53 structure from them and pass that to soup_socket_server_new.
55 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
56 dest_uri to origin_uri to match RFC 2616 terminology. Add an
58 (class_init, set_property, get_property): add SSL_CREDS property
59 (soup_connection_connect_async, soup_connection_connect_sync):
60 Pass ssl_creds to soup_socket_client_new calls.
62 * libsoup/soup-socket.c: Use GObject properties, including an
64 (soup_socket_set_flags): Gone (replaced with boolean properties)
65 (soup_socket_new): Make this take a list of properties
66 (listen_watch): copy ssl creds from listener to new socket
67 (soup_socket_start_ssl): Pass remote hostname and socket creds
68 structure to soup_ssl_wrap_iochannel.
69 (soup_socket_client_new_async, soup_socket_client_new_sync,
70 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
73 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
74 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
75 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
78 * tests/get.c: add a "-c CAfile" argument, for loading a CA
79 certificate file to validate https connections against
81 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
82 arguments for loading an SSL server certificate. Only start an SSL
83 server if those arguments were used.
85 * tests/test-cert.pem:
86 * tests/test-key.pem: SSL certificate for testing simple-httpd
88 * tests/revserver.c: Update for API changes
89 * tests/simple-proxy.c: Likewise
91 2003-09-22 Dan Winship <danw@ximian.com>
93 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
96 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
97 (soup_set_security_policy, soup_get_security_policy): Remove,
98 since the GNUTLS backend doesn't actually implement it.
99 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
101 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
104 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
107 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
108 soup_ssl_get_server_iochannel into a single function that takes a
111 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
112 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
113 (soup_gnutls_set_security_policy): Gone
115 * libsoup/soup-gnutls.h
116 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
119 * libsoup/soup-socket.c: Move soup_sockaddr_max
120 #define here from soup-private.h
121 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
124 * libsoup/soup-private.h: Gone
126 * libsoup/soup-address.c: Fix #includes for soup-private.h and
128 * libsoup/soup-auth-digest.c: Likewise
129 * libsoup/soup-auth.c: Likewise
130 * libsoup/soup-connection-ntlm.c: Likewise
131 * libsoup/soup-connection.c: Likewise
132 * libsoup/soup-dns.c: Likewise
133 * libsoup/soup-gnutls.c: Likewise
134 * libsoup/soup-headers.c: Likewise
135 * libsoup/soup-message-client-io.c: Likewise
136 * libsoup/soup-message-handlers.c: Likewise
137 * libsoup/soup-message-io.c: Likewise
138 * libsoup/soup-message-server-io.c: Likewise
139 * libsoup/soup-message.c: Likewise
140 * libsoup/soup-server-message.c: Likewise
141 * libsoup/soup-server.c: Likewise
142 * libsoup/soup-session.c: Likewise
143 * libsoup/soup-socket.c: Likewise
144 * tests/auth-test.c: Likewise
146 2003-09-19 Dan Winship <danw@ximian.com>
148 * libsoup/soup-address.c (update_address_from_entry): free the
151 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
154 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
155 iochannel initialization. Not sure how this worked before...
157 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
158 from soup_message_prepare (and a few things removed).
160 * libsoup/soup-message-client-io.c (soup_message_send_request):
161 s/soup_message_prepare/soup_message_cleanup_response/
163 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
164 with "\0" on the headers before passing them to the parse
166 (io_read): Call soup_message_cleanup_response after returning an
167 informational response so the data doesn't leak.
169 * libsoup/soup-headers.c (soup_headers_parse): Update for
170 soup-message-io.c:io_read change
172 * libsoup/soup-server.c (soup_server_new,
173 soup_server_new_with_host): Don't leak the SoupAddress.
175 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
177 (set_property): If the proxy uri changes, call
178 soup_session_abort() and cleanup_hosts().
179 (request_finished, final_finished): Fix a bug when requeuing
182 * tests/libsoup.supp: valgrind suppression file for soup tests
184 * tests/Makefile.am (EXTRA_DIST): dist it.
185 (noinst_PROGRAMS): move the former check_PROGRAMS to
186 noinst_PROGRAMS instead.
188 2003-09-18 Dan Winship <danw@ximian.com>
190 * libsoup/soup-message.c: Add wrote_informational and
191 got_informational signals.
193 * libsoup/soup-message-client-io.c (get_request_headers): Set the
194 EXPECT_CONTINUE flag on the message if that header is set.
196 * libsoup/soup-message-server-io.c (parse_request_headers):
199 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
200 when blocking on an expect-continue. Emit wrote_informational
201 instead of wrote_headers in the 1xx case.
202 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
203 reading a 100 Continue response. Emit got_informational instead of
204 got_headers in the 1xx case.
206 * libsoup/soup-session.c (soup_session_send_message): Reorder
207 things to deal with the fact that the message could finish right
208 away if there is a connection available and the server is very
211 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
212 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
214 2003-09-17 Dan Winship <danw@ximian.com>
216 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
217 (one that pruned too little, one that pruned too much).
218 (queue_message): When requeuing, don't run the queue;
219 final_finished will take care of that later.
220 (soup_session_abort): New, to cancel all pending requests.
222 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
223 the socket while waiting for the address to resolve
225 2003-09-17 Dan Winship <danw@ximian.com>
227 * libsoup/soup-connection.c (soup_connection_new): Replaces the
228 three previous soup_connection_new* functions and uses gobject
229 properties to set the destination and proxy uris.
230 (class_init): set up two more signals, authenticate and
232 (soup_connection_send_request): virtualize
233 (send_request): Default implementation
235 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
236 also handles NTLM authentication. Includes all of the NTLM code
237 formerly in soup-auth-ntlm.c.
239 * libsoup/soup-auth-ntlm.[ch]: Gone.
241 * libsoup/soup-auth.c: Remove NTLM refs
243 * libsoup/soup-session.c (class_init): Add gobject properties for
244 proxy, max_conns, use_ntlm. Change the "authenticate" and
245 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
246 can be used for authenticating SoupConnectionNTLM as well, which
247 doesn't use a SoupAuth).
248 (soup_session_new): Renamed from soup_session_new_default.
249 (soup_session_new_with_options): Replaces
250 soup_session_new_with_proxy and soup_session_new_full. Takes
252 (run_queue): Create a new connection of type SoupConnection or
253 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
254 to its authenticate and reauthenticate signals.
255 (connection_authenticate, connection_reauthenticate): proxy these
258 * libsoup/soup-address.c (update_address_from_entry): Fix a
259 crasher when failing to resolve the address.
261 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
262 working before" bugs.
264 * libsoup/soup-message-client-io.c (soup_message_send_request):
265 call soup_message_prepare() to clean up the existing response
268 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
269 when processing an OK EOF.
271 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
272 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
274 * tests/auth-test.c (authenticate, reauthenticate): Update for new
276 (main): Use soup_session_new.
277 * tests/get.c (main): Likewise.
278 * tests/simple-proxy.c (main): Likewise.
280 2003-09-10 Dan Winship <danw@ximian.com>
282 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
284 (invalidate_auth): Remove the call to soup_auth_invalidate.
285 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
286 contain authentication, then emit "authenticate" or
287 "reauthenticate" (depending on whether or not this is the first
288 time we've asked for a password for this auth).
289 (update_auth_internal): If the server rejects our
290 username/password, don't bail out immediately. Try doing a
291 "reauthenticate" first.
293 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
295 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
297 (soup_auth_invalidate): Remove this; it doesn't actually do
298 anything useful for us.
300 * libsoup/soup-auth-basic.c (invalidate): Remove
301 * libsoup/soup-auth-digest.c: (invalidate): Remove
302 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
304 * libsoup/soup-uri.c: Remove all references to "authmech".
305 (soup_uri_set_auth): Remove this too.
307 * tests/auth-test.c: Update to use the "authenticate" and
308 "reauthenticate" signals instead of encoding usernames and
309 passwords in the URIs. Add a few more test cases.
311 2003-09-10 Dan Winship <danw@ximian.com>
313 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
314 "status" field from here, since it's mostly used by SoupSession,
315 which shouldn't need access to SoupMessagePrivate.
317 * libsoup/soup-message.h (SoupMessage): Move it here.
318 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
319 (soup_message_set_uri): also moved from soup-message-private.h
321 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
323 * libsoup/soup-message-handlers.c:
324 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
326 * libsoup/soup-message-io.c (soup_message_io_client,
327 soup_message_io_server, soup_message_io_unpause): Don't set up an
328 idle handler, just jump right in to reading/writing; if this is a
329 synchronous socket, then the caller wants to block, and if it's
330 not, then we'll quickly get an EAGAIN anyway.
332 * libsoup/soup-session.c: (queue_message): Likewise.
333 (*) Update for SoupMessageStatus move and remove
334 soup-message-private.h include.
336 * libsoup/soup-server-message.c: Remove soup-message-private.h
339 * libsoup/soup-server.c: Likewise.
341 * libsoup/soup-connection.c (soup_connection_is_connected,
342 soup_connection_is_new): Remove these, since they weren't being
345 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
346 avoid namespace pollution.
348 * libsoup/soup-auth-digest.c: Update for that.
349 * libsoup/soup-server-auth.c: Likewise
351 * tests/auth-test.c: Remove soup-message-private.h include
353 2003-09-09 Dan Winship <danw@ximian.com>
355 Beginnings of improved synchronous API support
357 * libsoup/soup-dns.c: Simplify this by making it not automatically
358 return the result: force the caller to poll. (This isn't really a
359 performance issue: the results should come back quickly anyway.)
360 Also, make the cache thread-safe.
361 (soup_dns_entry_from_name): Was soup_gethostbyname
362 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
363 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
364 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
365 blocks if it's not resolved yet).
367 * libsoup/soup-address.c: Update for soup-dns changes.
368 (soup_address_new): Don't automatically start resolving the
369 hostname now, since we don't know if the caller is going to want
370 it resolved synchronously or asynchronously.
371 (soup_address_resolve_async): Renamed from soup_address_resolve.
372 (soup_address_resolve_sync): New routine to do blocking
375 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
376 status value directly when connecting synchronously.
377 (soup_socket_client_new_async, soup_socket_client_new_sync):
378 Separate async/sync client socket functions.
379 (soup_socket_get_iochannel): Made static since it was not used
382 * libsoup/soup-connection.c (soup_connection_new,
383 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
384 up the data, don't actually start connecting.
385 (soup_connection_connect_async, soup_connection_connect_sync): New
386 async and sync SoupConnection connecting routines.
387 (soup_connection_get_socket): Remove this since it wasn't being
390 * libsoup/soup-session.c (final_finished): Run the queue since a
391 connection is now freed up.
392 (run_queue): Update for soup_connection_new* changes.
394 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
395 wasn't being used any more.
397 * libsoup/soup-private.h: Remove some prototypes for functions
398 that no longer exist.
400 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
401 (copies the protocol, host, and port of a SoupUri).
405 * tests/simple-proxy.c: belatedly update for soup-session change
407 * tests/revserver.c: Handle each new connection in its own thread,
408 using synchronous SoupSocket calls.
410 2003-09-05 Dan Winship <danw@ximian.com>
412 * libsoup/soup-session.c: Move a bunch of logic here from
413 soup-context. Now the session keeps track of hosts (instead of
414 having a global soup_hosts hash) and their connections.
415 (soup_session_new_with_proxy, soup_session_new_full): New session
416 constructors to specify a proxy or a proxy and connection limits
417 (send_request): Add Authorization and Proxy-Authorization headers
418 before sending off the request.
419 (soup_session_queue_message, et al): Improve the way this works.
420 There's no need to use timeouts to wait for connections to become
421 free; we *know* when they become free.
423 * libsoup/soup-private.h: Remove SoupHost and some other
424 no-longer-used stuff.
426 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
427 soup_set_connection_limit, soup_set_connection_limit): Gone. These
428 are all per-session now.
430 * libsoup/soup-message.c: Remove all SoupContext references
431 (mostly replaced with SoupUri references)
432 (cleanup_message): priv->connect_tag and priv->connection are gone
433 now, so this was just soup_message_io_cancel(). So remove
434 cleanup_message and replace it with that everywhere.
435 (soup_message_disconnect): Gone.
436 (soup_message_set_uri): Replaces soup_message_set_context.
437 (soup_message_set_connection, soup_message_get_connection): Gone
439 * libsoup/soup-message-server-io.c (parse_request_headers):
440 s/soup_message_set_context/soup_message_set_uri/
442 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
443 connect_tag, context, and connection.
445 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
447 * libsoup/soup-context.c: Gone
449 * tests/auth-test.c (identify_auth): update for session/context
452 2003-09-03 Dan Winship <danw@ximian.com>
454 * libsoup/soup-status.h: Renamed from soup-error.h, with types
455 and defines renamed accordingly.
457 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
458 status_code and errorphrase to reason_phrase. Remove errorclass.
459 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
460 as being either "errors" or "not errors", so its semantics are
461 guaranteed to be wrong sometimes.
463 * libsoup/soup-message.c (soup_message_set_status,
464 soup_message_set_status_full): Renamed
466 * libsoup/soup-message-handlers.c
467 (soup_message_add_status_code_handler,
468 soup_message_add_status_class_handler): Rename.
470 * libsoup/soup-session.c (soup_session_send_message): Make this
471 return a status code rather than a status class.
473 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
474 unrelated unused fields (retries, callback, user_data).
478 2003-09-02 Dan Winship <danw@ximian.com>
480 * libsoup/soup-session.c: First draft at the new object to
481 maintain formerly-global state. (Not yet complete; still need to
482 get rid of SoupContext).
484 * libsoup/soup-message-queue.c: Data structure used by SoupSession
486 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
487 some bits went into soup-connection.
489 * libsoup/soup-connection.c (soup_connection_send_request): New,
490 to send a request on a connection. The connection updates its
491 internal state and then hands off to soup_message_send_request.
492 (request_done): Callback set up by soup_connection_send_request.
493 Marks the connection as no-longer-in-use, and disconnects it if
495 (soup_connection_set_in_use, soup_connection_mark_old): No longer
496 needed; the connection takes care of this itself now.
497 (soup_connection_new_proxy): New, to create a new connection that
498 is explicitly marked as being through an HTTP proxy.
499 (soup_connection_new_tunnel): New, to create a new HTTPS
500 connection through a proxy. (Includes the code to send the
503 * libsoup/soup-context.c (try_existing_connections): Don't need to
504 call soup_connection_set_in_use.
505 (try_create_connection): Use soup_connection_new,
506 soup_connection_new_proxy, or soup_connection_new_tunnel as
509 * libsoup/soup-message.c (soup_message_prepare): Replaces
511 (soup_message_queue, soup_message_requeue, soup_message_prepare):
512 Gone. This must be done via a SoupSession now.
513 (soup_message_set_connection): don't need to mark in_use/not
514 in_use. Also, msg->priv->socket is gone now.
515 (soup_message_get_socket): Gone.
517 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
518 Remove references to global handlers.
519 (redirect_handler, authorize_handler): Moved to soup-session.c.
521 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
522 session to shut down now.
524 * libsoup/soup.h: add soup-session.h
526 * libsoup/Makefile.am: updates
528 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
531 2003-08-29 Dan Winship <danw@ximian.com>
533 * libsoup/soup-message-io.c: Major rewrite. There is now only a
534 single IO state object (instead of one for reading and one for
535 writing), and the IO code handles switching back and forth between
536 reading and writing as appropriate (including handling the extra
537 switches needed for "Expect: 100-continue").
538 (soup_message_io_client, soup_message_io_server): The new entry
540 (soup_message_io_cancel): If the caller cancels the IO when we
541 were expecting to read more data, disconnect the socket.
543 * libsoup/soup-message.h (SoupMessageFlags): add
544 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
545 do the special expect-continue handling.
547 * libsoup/soup-message.c: Move all the signal stuff here. Remove
548 the "done_reading" and "done_writing" signals and replace them
549 with a single "finished" signal. (A single signal. Say that 10
551 (soup_message_got_headers, etc): Functions to emit signals.
552 (got_headers, got_chunk, got_body): Default signal methods that
553 call soup_message_run_handlers.
554 (finished): Default signal method that replaces
555 soup_message_issue_callback.
556 ([various]): s/soup_message_issue_callback/soup_message_finished/
557 (soup_message_requeue): There's no soup_message_set_read_callbacks
558 any more, so if the caller requeues while it's still reading, just
560 (soup_message_add_chunk, soup_message_add_final_chunk,
561 soup_message_pop_chunk): Moved here from soup-server-message,
562 although we don't actually quite support using chunked encoding
565 * libsoup/soup-server-message.c (soup_server_message_new): No
566 longer takes a socket argument.
567 (soup_server_message_add_chunk, soup_server_message_get_chunk):
568 Moved into SoupMessage.
570 * libsoup/soup-message-handlers.c (global_handlers): Make these
571 POST_BODY rather than PRE_BODY, so they won't mess up the IO
572 channel when the requeue the message.
573 (soup_message_run_handlers): Don't need to issue the message
574 callback from here any more.
575 (authorize_handler): Just leave the error as 401 or 407 (see
578 * libsoup/soup-message-client-io.c (soup_message_send_request):
579 Replaces soup_message_write_request and
580 soup_message_read_response.
582 * libsoup/soup-message-server-io.c: Parallel to
583 soup-message-client-io.c, this defines the server-side header
585 (soup_message_read_request): Its entry point.
587 * libsoup/soup-server.c: Lots of code moved into
588 soup-message-server-io.c. Update for other changes.
590 * libsoup/soup-queue.c: Update for changes
592 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
593 Don't call soup_socket_disconnect() on an error, just return
594 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
595 signals that will mess up the caller of the read/write function.
597 * libsoup/soup-connection.c (soup_connection_disconnect): When
598 disconnecting the socket, disconnect from its signals first to
599 prevent bad reentrancy.
601 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
602 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
603 anything that SOUP_ERROR_UNATHORIZED and
604 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
605 "transport" errors actually are transport-related.)
607 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
609 * tests/simple-proxy.c: Complicate this a bunch. In particular,
610 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
611 pass the data back to the client in chunked format.
613 2003-08-27 Dan Winship <danw@ximian.com>
615 * libsoup/soup-types.h: New header with typedefs, to avoid
616 #include loops among other headers.
618 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
620 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
622 2003-08-26 Dan Winship <danw@ximian.com>
624 * libsoup/soup-message-client-io.c (soup_message_write_request,
625 soup_message_read_response): Higher-than-soup-message-io-level
626 functions to do client-side IO. (Code that used to be in
628 (get_request_header_cb): Fix a bug in the generation of the Host:
629 header; need to include the port number if it's not the default.
631 * libsoup/soup-message-io.c (soup_message_write,
632 soup_message_write_simple): Take separate user_datas for the get_*
633 callbacks and the done callbacks.
635 * libsoup/soup-queue.c: Update to use soup_message_write_request
636 and soup_message_read_response.
638 * libsoup/soup-connection.c (soup_connection_new): Change the
639 prototype to take a SoupUri and a callback.
641 * libsoup/soup-context.c (try_create_connection,
642 soup_context_connect_cb): Update for soup_connection_new change.
644 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
645 for soup_message_write changes
647 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
650 2003-08-26 Dan Winship <danw@ximian.com>
652 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
653 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
654 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
656 * libsoup/soup-message.c (class_init): set up signals
657 (requeue_read_finished): Update for changes.
659 * libsoup/soup-message-io.c (soup_message_read): Split out
660 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
661 arg to say where to store the message body. Set up
662 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
664 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
665 (read_body_chunk): emit READ_CHUNK.
666 (issue_final_callback): Set r->body. emit READ_BODY.
667 (failed_read): emit READ_ERROR.
668 (soup_message_read_set_callbacks): Disconnect old signal handlers,
670 (soup_message_read_cancel): Disconnect signal handlers.
671 (soup_message_write, soup_message_write_simple): Set up
672 wrote_body_cb and error_cb as signal handlers.
673 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
674 nothing currently ever listens for them. emit WROTE_BODY when
676 (failed_write): emit WRITE_ERROR
678 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
679 soup_queue_read_headers_cb): Split this into two unequal chunks.
680 (read_header_cb only runs the pre-body handlers).
681 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
683 (soup_queue_write_done_cb): Update call to soup_message_read
685 * libsoup/soup-server.c (parse_headers_cb): Renamed from
687 (read_done_cb): Update prototype
688 (start_request): Update soup_message_read call.
690 2003-08-25 Dan Winship <danw@ximian.com>
692 * libsoup/soup-message-io.c (soup_message_read,
693 soup_message_write, soup_message_write_simple): Add a "user_data"
694 arg, pass it to the callbacks.
696 * libsoup/soup-message.c (soup_message_requeue,
697 requeue_read_finished, requeue_read_error): Update for that
699 * libsoup/soup-queue.c: Likewise
701 * libsoup/soup-server.c: Likewise
703 2003-08-25 Dan Winship <danw@ximian.com>
705 * libsoup/soup-message.c (soup_message_new): Take a uri string
706 instead of a context. Also, swap the args (so the method comes
707 before the URI, just like in the protocol).
708 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
709 SoupUri instead of a string
710 (soup_message_set_request, soup_message_set_response): Replace
711 soup_message_new_full.
712 (cleanup_message): Was soup_message_cleanup, but is static now.
713 (queue_message): Do the pre-queuing message cleanup here instead
714 of in soup_queue_message.
715 (soup_message_queue): Set the callback and user_data, then call
717 (requeue_read_error, requeue_read_finished, soup_message_requeue):
719 (soup_message_get_uri): Replaces soup_message_get_context.
721 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
722 part of SoupMessagePrivate now)
724 * libsoup/soup-context.c: #include soup-message-private
725 (soup_context_from_uri): constify the uri arg.
727 * libsoup/soup-queue.c: Various context/uri fixes
728 (proxy_https_connect): Use soup_message_new_from_uri.
729 (soup_queue_message): Drastically simplified since most of the
730 work is in soup-messsage.c:queue_message() now
732 * libsoup/soup-auth-digest.c (compute_response,
733 get_authorization): Use soup_message_get_uri.
735 * libsoup/soup-server-auth.c (parse_digest): Likewise
737 * libsoup/soup-server.c (call_handler): Likewise
739 * tests/simple-httpd.c (server_callback): Likewise.
741 * tests/simple-proxy.c (server_callback): Likewise
743 * tests/get.c (got_url): Likewise.
744 (get_url): Update soup_message_new usage.
746 * tests/auth-test.c: #include soup-message-private. Update for
747 context changes and soup_message_new change.
749 2003-08-22 Dan Winship <danw@ximian.com>
751 * libsoup/soup-message-private.h: New file containing
752 SoupMessagePrivate and some other soup-message-internal
753 types/functions. Also includes the new, expanded SoupMessageStatus
756 * libsoup/soup-message-io.c: Replaces what used to be in
757 soup-transfer, but now all the interfaces take SoupMessages
758 instead of SoupReader/SoupWriter and deal with maintaining
759 msg->priv->{read,write}_state themselves. Fixes up all the
762 * libsoup/soup-message-handlers.c: Move the handler code here,
763 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
764 to make the distinction from SoupHandlerKind clearer.)
766 * libsoup/soup-message.c: Update for soup-message-io and new
767 SoupMessageStatus values. Remove handler code.
768 (soup_message_cleanup): Remove the hack to try to preserve the
769 connection if the message gets cleaned up before it finishes
770 reading. soup_message_requeue handles this in the requeuing case,
771 and there's no especially compelling reason to bother doing it in
772 any other case. (And the soup-message-io api doesn't support
773 having a read operation that's not connected to any message.)
775 * libsoup/soup-private.h: remove SoupMessagePrivate
777 * libsoup/soup-queue.c: Update for soup-message-io and new
778 SoupMessageStatus values.
780 * libsoup/soup-server-message.c: Likewise
782 * libsoup/soup-server.c: Likewise
784 * libsoup/soup-transfer.c: Gone (yay)
786 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
788 2003-08-20 Dan Winship <danw@ximian.com>
790 * libsoup/soup-message.c: Make this a GObject. (Note that since
791 SoupMessage was not refcounted before, it's not really refcounted
793 (soup_message_free): Gone, replaced by g_object_unref
794 (soup_message_copy, soup_message_foreach_remove_header): Remove
795 these, since neither was currently functional.
796 (soup_message_is_keepalive): New utility function to look at
797 HTTP version and request/response headers to decide if a message
798 indicates the connection should be kept alive.
799 (soup_message_set_connection, soup_message_get_connection): New
800 (soup_message_get_socket): New
802 * libsoup/soup-server-message.c: Make this a subclass of
804 (soup_server_message_new): Now takes a SoupServer and SoupSocket
805 (soup_server_message_get_server): New
806 (soup_server_message_set_encoding,
807 soup_server_message_get_encoding): Get/set whether the message
808 should be sent with content-length or chunked encoding
809 (soup_server_message_is_started, soup_server_message_is_finished):
810 Private member accessors.
811 (soup_server_message_add_chunk): Renamed from add_data
812 (soup_server_message_get_chunk): Pops a chunk from the list.
813 (soup_server_message_get_source): Gone
815 * libsoup/soup-server.c: Update for SoupServerMessage changes.
816 (error_cb, write_done_cb): All the cleanup stuff that used to be
817 here happens automatically by unreffing the message now.
818 (get_response_header): Remove some erroneous leftover CGI stuff
819 (issue_bad_request): add "Connection: close" to the response.
820 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
821 with no Host header as per RFC 2616.
823 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
824 (soup_connection_set_in_use): Let the caller set the connection to
825 "not in use" even after the socket has been disconnected.
827 * libsoup/soup-context.c: Use soup_message_get_connection
829 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
830 check on request length, since it was rejecting
831 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
833 * libsoup/soup-queue.c: Use soup_message_get_connection and
834 soup_message_get_socket.
835 (soup_queue_read_done_cb): Use soup_message_is_keepalive
836 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
837 soup_connection_start_ssl
839 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
840 handlers if the socket hasn't been disconnected yet.
842 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
843 reader_read): Fix these so that reader_read will exit properly if
844 the read is cancelled.
846 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
848 * tests/simple-httpd.c (server_callback): set the message to
849 content-length encoding.
850 * tests/simple-proxy.c (server_callback): Likewise
852 2003-08-19 Dan Winship <danw@ximian.com>
854 * libsoup/soup-socket.c (soup_socket_read,
855 soup_socket_read_until, soup_socket_write): New API for doing
856 socket IO. Works both synchronously and asynchronously, and
857 buffers data to prevent the "100 Continue" problem.
858 (soup_socket_set_flag): Replaces formerly-private
859 soup_set_sockopts. (primarily to let the caller turn off
860 SOUP_SOCKET_FLAG_NONBLOCKING).
862 * libsoup/soup-transfer.c (soup_transfer_read,
863 soup_transfer_write, soup_transfer_write_simple): Take a
864 SoupSocket instead of a GIOChannel. Use the new socket IO api.
865 Changed the prototypes of some of the callbacks to be less
868 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
869 soup_connection_get_iochannel.
871 * libsoup/soup-message.c: Fix up for soup-transfer changes
873 * libsoup/soup-queue.c: Likewise
875 * libsoup/soup-server.c: Likewise
877 * tests/revserver.c: A slightly more complicated replacement for
878 timeserver. (Does both reads and writes)
880 2003-08-19 Dan Winship <danw@ximian.com>
882 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
883 configure it, and no one has complained, and it looks like the
884 SOCKS5 auth code doesn't actually work anyway...
886 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
888 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
891 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
893 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
896 2003-08-19 Dan Winship <danw@ximian.com>
898 * libsoup/soup-server.c: Make this a GObject. Remove
899 SoupServerMessage code (to soup-server-message.c). Remove CGI
900 server code (for now?)
901 (soup_server_add_handler, soup_server_remove_handler): Rename
902 (from register/unregister) to make it clearer what they do.
904 * libsoup/soup-server-message.c: Moved out of soup-server.c
906 * libsoup/soup-private.h: Remove SoupServer def
908 * libsoup/Makefile.am (libsoupinclude_HEADERS,
909 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
911 * tests/simple-httpd.c:
912 * tests/simple-proxy.c: Update for SoupServer changes
914 2003-08-18 Dan Winship <danw@ximian.com>
916 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
917 a struct sockaddr again (like it used to be). In particular, add
918 back the "port" field. Add a bunch of macros to try (and fail) to
919 simplify some of the code.
920 (soup_address_new): Now returns a SoupAddress directly rather than
921 a random handle, and the caller can just use g_object_unref to
922 cancel the lookup. Also, the callback now uses a
923 SoupKnownErrorCode rather than a special-purpose address-lookup
925 (soup_address_new_cancel): No longer needed.
926 (soup_address_new_sync): Removed
927 (soup_address_new_any): Replaces soup_address_ipv4_any and
928 soup_address_ipv6_any.
929 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
931 (soup_address_get_physical): Renamed from
932 soup_address_get_canonical_name.
933 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
935 * libsoup/soup-socket.c: Update for SoupAddress changes and make
936 similar changes here.
937 (soup_socket_new): Just creates a generic SoupSocket now.
938 (soup_socket_connect): Client setup
939 (soup_socket_listen): Server setup. Now also sets up an iochannel
940 listening for connects and emits a "new_connection" signal as they
942 (soup_socket_start_ssl): Turns on SSL.
943 (soup_socket_client_new, soup_socket_server_new): Utility
944 functions that wrap the above.
945 (soup_socket_new_cancel, soup_socket_new_sync): Gone
946 (soup_socket_server_accept, soup_socket_server_try_accept): No
948 (soup_socket_get_iochannel): No longer adds a ref when returning
949 the iochannel. Also, we set it to "close_on_unref" so that if a
950 caller adds a ref to it, the connection will actually remain open
951 even after the SoupSocket is destroyed.
952 (soup_socket_get_local_address, soup_socket_get_remote_address):
953 Let the caller get both of these.
955 * libsoup/soup-connection.c: Don't keep a private copy of the
957 (soup_connection_new): Don't need to set socket options here.
959 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
960 (soup_connection_get_iochannel): Just return the socket's
961 iochannel (and don't ref it)
963 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
964 SOUP_ERROR_CANT_RESOLVE_PROXY
966 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
967 Remove the "FIXME add a CANT_RESOLVE error" and return
968 SOUP_ERROR_CANT_RESOLVE instead.
970 * libsoup/soup-server.c: Update for socket/address changes. Don't
971 poke into SoupSocket's private fields.
972 (soup_server_run_async): Just connect to the socket's
973 "new_connection" signal.
975 * libsoup/soup-context.c (try_create_connection,
976 soup_context_connect_cb): Update for socket changes. Replace
977 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
979 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
980 to connect to a signal handler and connect another function to
981 clean up the first signal handler after its first invocation.
982 (Lets us use signals to replace one-off callbacks.)
984 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
985 actually private now.
986 (struct _SoupServer): Remove accept_tag.
988 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
989 Don't unref the iochannel.
990 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
992 * libsoup/soup-socks.c: Update for socket/address changes
994 * tests/simple-httpd.c (main):
995 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
996 * tests/simple-proxy.c (main): Likewise
998 * tests/timeserver.c: Update for SoupSocket's "new_connection"
999 signal, and for SoupAddress changes.
1001 2003-08-14 Dan Winship <danw@ximian.com>
1003 * libsoup/soup-connection.c: New, split out from soup-context and
1004 made into a GObject.
1005 (soup_connection_disconnect): Disconnects the connection and emits
1006 a signal. (Replaces the old "keep_alive" flag.)
1007 (soup_connection_is_connected): Checks if the connection is still
1009 (connection_died): Just disconnect, rather than freeing the
1010 connection. This way if anyone else is still referencing it they
1011 won't end up with an invalid pointer.
1013 * libsoup/soup-context.c: Make this a GObject, remove all the
1014 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
1015 SoupContext can keep track of connection auth stuff there without
1016 SoupConnection needing to care. Various other updates.
1018 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
1021 * libsoup/*.c, tests/get.c: Update for context/connection changes
1023 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
1024 definition to deal with the fact that there's no
1025 soup_connection_get_context any more.
1027 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
1028 with connection persistence here.
1029 (soup_queue_read_done_cb): Do it here instead. Disconnect the
1030 connection when appropriate.
1031 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
1032 Reference-count the connection properly. (I think.)
1034 * libsoup/soup-marshal.list: New, for SoupConnection's
1035 "disconnected" signal.
1037 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
1039 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
1040 GLIB_GENMARSHAL gets set too.
1042 2003-08-14 Dan Winship <danw@ximian.com>
1044 * libsoup/soup-error.c: Fix a spelling mistake.
1046 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
1048 2003-08-12 Dan Winship <danw@ximian.com>
1050 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
1051 of the interfaces around a little bit.
1053 * libsoup/soup-auth-basic.c: subclass for Basic auth
1055 * libsoup/soup-auth-digest.c: subclass for Digest auth
1057 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
1058 the code from soup-ntlm.c here, and make it private.
1060 * libsoup/soup-ntlm.c: gone
1062 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
1063 here, and change the signature of SoupAuthorizeFn.
1065 * libsoup/soup-context.c: Use g_object_unref to free auths, use
1066 methods instead of directly access private fields.
1068 * libsoup/soup-queue.c: Likewise
1070 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
1071 NTLM references. We have no plans to implement server-side NTLM
1074 * tests/auth-test.c (identify_auth): Update for auth api changes
1076 2003-08-12 Dan Winship <danw@ximian.com>
1078 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
1081 * libsoup/soup-address.c: Make this a GObject.
1082 (soup_address_ref, soup_address_unref): Gone.
1083 (soup_address_copy): Gone. Wasn't being used anyway.
1085 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
1086 here from soup-address.c, so that soup-address doesn't need to
1087 worry about trying to cache zero-ref addresses.
1089 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
1090 consistently for port numbers.
1091 (soup_socket_ref, soup_socket_unref): Gone.
1093 * libsoup/soup-private.h: Change the SoupSocket definition to be
1094 SoupSocketPrivate. (Still need to keep this here since soup-server
1095 pokes around in its internals.)
1096 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
1098 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
1099 reader/writer rather than leaking them.
1101 * libsoup/*: Use GObject methods for socket/address refcounting
1103 * tests/auth-test.c (main)
1104 * tests/timeserver.c (main): Call g_type_init.
1106 * tests/get.c (main): Call g_type_init.
1107 (get_url, got_url): Fix some bugs that could make -r mode get into
1108 infinite loops downloading the same files over and over. Plug some
1109 memory leaks to make this more useful for valgrinding libsoup.
1111 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
1112 handler for SIGINT so we can exit cleanly, since valgrind won't
1113 give a leak report if you don't. Plug a few memory leaks.
1115 * tests/simple-proxy.c (main): Likewise
1117 2003-08-12 Dan Winship <danw@ximian.com>
1119 Pull over some new test programs from the soup-refactoring branch,
1120 along with the SoupUri changes they depend on.
1122 * tests/simple-httpd.c: A really simple HTTP server, to test the
1125 * tests/simple-proxy.c: An even simpler HTTP proxy
1127 * tests/get.c: Add "-r" flag to recursively get files (thereby
1128 testing multiple-connections-at-once code). Also good for setting
1129 up a tree to use with simple-httpd.
1131 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
1134 * tests/uri-parsing.c: Regression test for the new soup-uri.c
1136 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
1137 pull in some optimizations from camel-url. Also, make SoupProtocol
1138 a GQuark so we can still compare them with ==, but we can also
1139 recognize any protocol.
1140 (soup_uri_new_with_base): New, to merge base and relative URIs
1141 (soup_uri_to_string): Update this. Change the "show_password" flag
1142 (which we always passed FALSE for) to "just_path", for places that
1143 want the path+query without the protocol, host, etc.
1145 * libsoup/soup-queue.c (soup_get_request_header): Just use
1146 soup_uri_to_string to generate the request URI.
1148 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
1149 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
1150 the URI by hand badly.
1151 * libsoup/soup-server-auth.c (parse_digest): Likewise
1153 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
1154 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
1157 * libsoup/soup-context.c (soup_context_uri_hash,
1158 soup_context_uri_equal): s/querystring/query/
1160 2003-08-12 Dan Winship <danw@ximian.com>
1162 * configure.in: Bump API version to 2.2 and package version to
1163 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
1164 libgnutls-config to find GNUTLS.
1166 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
1168 * Makefile.am: Update for pc file rename
1170 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
1171 and libsoup-ssl-proxy stuff.
1173 * libsoup/soup-ssl-proxy.c
1174 * libsoup/soup-nss.[ch]
1175 * libsoup/soup-openssl.[ch]: gone
1177 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
1179 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
1180 auth_test_LDADD): Update libsoup version
1182 2003-08-07 Dan Winship <danw@ximian.com>
1184 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
1185 soup_auth_invalidate): These are all really SoupContext functions,
1186 so move them to soup-context.c (and rename them appropriately).
1187 (soup_auth_get_protection_space): New method to get the
1188 "protection space" of an auth (paths where it is valid).
1189 (soup_auth_invalidate): New method to try to un-authenticate an
1190 auth (so we can keep the domain info cached even if the auth info
1192 (basic_pspace_func): Basic protection space is all directories
1193 below the current one.
1194 (basic_invalidate_func): Clear the encoded username/password
1195 (digest_pspace_func): Digest protection space is either the whole
1196 server, or "what the domain parameter says" (though we don't deal
1197 with cross-host domains).
1198 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
1200 (digest_parse_func, digest_free): Set/free domain parameter
1201 (ntlm_pspace): NTLM protection space is always the whole server.
1202 (ntlm_invalidate): Clear the auth state.
1203 (soup_auth_new_ntlm): Make this non-static
1204 (SoupAuth): Replace the quad-state "status" field with an
1205 "authenticated" boolean.
1207 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
1208 hash with separate "auth_realms" (path->realm) and "auths"
1209 (realm->auth) hashes. Also add a "use_ntlm" flag.
1211 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
1213 (connection_free): Don't the connection's auth, just free it.
1214 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
1215 does two-stage lookup (path->realm then realm->auth) and also
1216 deals with NTLM hacks.
1217 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
1218 but also large parts of authorize_handler. Updates the auth hashes
1219 based on information from a 401 or 407 response. Does a better job
1220 than authorize_handler did of not throwing away good information.
1221 (soup_context_preauthenticate): New; fakes up auth info so that
1222 requests will end up using authentication without the server
1223 needing to return an error first.
1224 (soup_context_authenticate_auth): Moved out of authorize_handler
1225 so it can be used at request-sending time too, if we know that we
1226 need it. (That way we can avoid requeuing the request if it isn't
1227 going to be able to be authenticated.)
1228 (soup_context_invalidate_auth): Sort of like the old
1229 soup_auth_invalidate, but only destroys the auth data, while still
1230 remembering the path->realm mapping.
1232 * libsoup/soup-message.c (authorize_handler): Mostly moved into
1233 soup_context_update_auth.
1234 (maybe_validate_auth): Remove this; it was only useful because of
1235 bugs elsewhere in the auth handling.
1237 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
1238 soup_context_lookup_auth. If the returned auth isn't
1239 authenticated, call soup_context_authenticate_auth() on it.
1241 * tests/auth-test.c: New (from soup-refactoring branch). Tests
1242 that the Basic/Digest auth code does the right thing. (TODO: find
1243 a good way to add NTLM tests too.)
1245 * tests/Makefile.am (check_PROGRAMS): add auth-test
1247 2003-07-29 Dan Winship <danw@ximian.com>
1249 * configure.in: 1.99.25 ("Potato and Leek Soup")
1251 * libsoup/soup-message.c (requeue_read_finished,
1252 release_connection): Free the passed-in body data. Otherwise the
1253 response body ends up getting leaked on most 3xx and 4xx
1255 (soup_message_cleanup): Remove a piece of code that didn't
1256 actually do anything and its associated confused comment.
1258 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
1260 * libsoup/soup-context.c (connection_free): plug a non-occasional
1263 2003-06-26 Joe Shaw <joe@ximian.com>
1265 * configure.in: Version 1.99.24
1267 2003-06-24 Dan Winship <danw@ximian.com>
1269 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
1270 it, and (b) depends on lots of new things sometimes (like on RH9).
1272 * libsoup/soup-openssl.c:
1273 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
1274 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
1277 2003-06-19 Dan Winship <danw@ximian.com>
1279 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
1280 old read_tag before changing/clearing it.
1281 (soup_queue_write_done_cb): Likewise with the write_tag.
1283 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
1284 around the stop+callback.
1285 (soup_transfer_write_cb): Likewise.
1287 2003-06-12 Dan Winship <danw@ximian.com>
1289 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
1291 (soup_transfer_read, create_writer): Set initial ref_count to 2
1292 (one for soup-transfer, one for the caller).
1293 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
1295 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
1296 drops soup-transfer's ref.
1297 (soup_transfer_read_cancel): Now just a stop+unref
1298 (soup_transfer_write_ref, soup_transfer_write_unref,
1299 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
1301 * libsoup/soup-message.c (soup_message_cleanup): when setting up
1302 the "finish reading" callbacks, unref the reader so it will be
1303 destroyed once it's done reading.
1304 (soup_message_requeue): Likewise.
1306 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
1307 prototype change (no longer returns a SoupTransferDone).
1308 (soup_queue_read_chunk_cb): Likewise.
1310 * libsoup/soup-server.c (read_headers_cb): Likewise
1312 2003-06-11 Dan Winship <danw@ximian.com>
1314 * libsoup/soup-transfer.c: Change all functions to take a
1315 SoupReader * or SoupWriter * instead of a guint.
1317 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
1318 write_tag pointers instead of guints.
1320 2003-06-02 Chris Toshok <toshok@ximian.com>
1322 * libsoup/soup-ssl.c: remove #include for soup-nss.h
1324 2003-06-02 Chris Toshok <toshok@ximian.com>
1326 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
1327 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
1328 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
1330 2003-06-02 Chris Toshok <toshok@ximian.com>
1332 * configure.in: Bump version to 1.99.23.
1334 2003-05-30 Chris Toshok <toshok@ximian.com>
1336 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
1337 reconnect when there's an error with ssl connection. This fixes
1338 #43387, but it runs the risk of sending requests multiple times to
1339 the exchange server, and it results in lots of shorter lived
1340 connections and more forking (in the ssl proxy case), depending on
1341 the length of the operation.
1343 2003-05-21 Dan Winship <danw@ximian.com>
1345 * configure.in: 1.99.22 (codename: French Onion Soup)
1347 2003-05-20 Dan Winship <danw@ximian.com>
1349 * libsoup/soup-message.c (soup_message_requeue): Clear the
1350 write_tag as well so we don't double-cancel it. #43395.
1352 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
1353 be destroyed by the end of the func, so we have to call
1354 soup_connection_set_used at the beginning.
1356 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
1357 Call g_set_error() so that we don't SEGV immediately after
1358 returning G_IO_STATUS_ERROR.
1360 2003-05-08 Joe Shaw <joe@ximian.com>
1362 * configure.in: Bump version to 1.99.21
1364 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
1365 tunnelling fails, the other message which shares our same
1366 connection will free it first, so set ours to NULL.
1368 2003-05-08 Dan Winship <danw@ximian.com>
1370 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
1371 return an NTLM request string. Otherwise return the "response"
1372 field (which should include the NTLM authenticate message)
1373 (ntlm_init): Don't bother setting "response" to the NTLM request
1374 string. Just leave it NULL in that case.
1376 * libsoup/soup-message.c (authorize_handler): Never try to reuse
1377 an NTLM auth returned from soup_auth_lookup. Only set the auth on
1378 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
1379 call soup_auth_set_context() on it just like for non-NTLM auth.
1380 The net effect of all of this is that now we record when a context
1381 needs NTLM auth just like with non-NTLM auth, so that that info
1382 gets preserved across connections.
1383 (soup_message_requeue): No longer need the hackery here to
1384 preserve the connection auth state.
1386 2003-05-07 Dan Winship <danw@ximian.com>
1388 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
1389 toggle the connection's in_use flag, and set up the death watch
1390 when it's not in use.
1391 (connection_death): This is only hooked up when the connection is
1392 not in use now, so don't need to check that. Should fix the
1393 infinite connection_death loop.
1394 (soup_connection_is_new): Keep a distinct "new" flag rather than
1395 defining "new" as "has been released at least once".
1396 (soup_connection_set_used): Mark a connection no-longer new.
1397 (soup_context_connect_cb): Mark the connection as new. Don't set
1398 up the death watch since it's in_use.
1399 (try_existing_connections): Use soup_connection_set_in_use.
1400 (soup_connection_release): Likewise
1402 * libsoup/soup-message.c (requeue_read_finished): Call
1403 soup_connection_set_used so that the connection isn't still
1404 considered new when we send the message the second time.
1406 * libsoup/soup-queue.c (soup_queue_error_cb): Call
1407 soup_connection_set_used (assuming we don't close the connection)
1408 (soup_queue_read_done_cb): Likewise.
1410 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
1411 nothing, call soup_transfer_read_error_cb rather than just
1412 cancelling, or else it will get cancelled again later.
1414 2003-05-07 Dan Winship <danw@ximian.com>
1416 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
1417 library doesn't depend on them, only the proxy does. #42473
1419 2003-05-06 Dan Winship <danw@ximian.com>
1421 * src/libsoup/soup-message.c (global_handlers): Change the
1422 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
1423 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
1424 for "Location" to get around the non-64-bit-clean union
1425 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
1426 (redirect_handler): Update for that.
1428 2003-04-28 Dan Winship <danw@ximian.com>
1430 * configure.in: 1.99.20
1432 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
1433 we always call UNIGNORE_CANCEL. Might fix #41971
1435 2003-04-25 Dan Winship <danw@ximian.com>
1437 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
1438 suddenly gets an io error while reading or writing, assume it's a
1439 timeout or something, close the connection, and requeue the
1442 2003-04-23 Dan Winship <danw@ximian.com>
1444 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
1445 soup-transfer callbacks to keep reading off the connection unless
1446 we're actually going to keep the connection around afterward.
1447 Otherwise we can just close it.
1449 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
1450 thingy so that it's possible to cancel a read from inside a
1451 callback so that the above change actually works instead of just
1454 2003-04-20 Rodney Dawes <dobey@ximian.com>
1456 * configure.in: Up version to 1.99.18
1457 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
1459 2003-04-11 Dan Winship <danw@ximian.com>
1461 * libsoup/soup-context.c (soup_connection_purge_idle): New
1462 function to close all idle connections. (Needed for #41117 or else
1463 there's no way to force-discard NTLM authentication.)
1465 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
1467 2003-04-10 Joe Shaw <joe@ximian.com>
1469 * libsoup/soup-queue.c (proxy_https_connect):
1470 proxy_https_connect_cb() might not get called if connecting to the
1471 proxy fails, and it causes us to double-free the connection.
1472 Always set the message's connection to NULL before freeing it.
1474 2003-04-09 Dan Winship <danw@ximian.com>
1476 * configure.in: 1.99.17
1478 2003-04-07 Dan Winship <danw@ximian.com>
1480 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
1481 We can't release the connection there because there may be
1482 SoupMessages still pointing to it. (Needs to be revisited.)
1484 2003-04-03 JP Rosevear <jpr@ximian.com>
1486 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
1487 error during waitpid
1489 * libsoup/soup-address.c: ditto
1491 2003-04-02 Joe Shaw <joe@ximian.com>
1493 * libsoup/soup-context.c (connection_death): Only drop the
1494 connection if we get an error condition on the channel. Fixes a
1497 2003-04-02 Joe Shaw <joe@ximian.com>
1499 * libsoup/soup-context.c (connection_death): Just call
1500 soup_connection_release() from here and return whether the
1501 connection is in use.
1503 2003-03-31 Ian Peters <itp@ximian.com>
1505 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
1506 case of EAGAIN or EINTR, since shutting down an SSL connection
1507 requires more than just closing a socket.
1509 2003-03-28 Dan Winship <danw@ximian.com>
1511 * libsoup/soup-message.c (soup_message_set_context): If the new
1512 context points to a different server from the old context, call
1513 soup_message_cleanup. Otherwise it tries to reuse the old
1516 2003-03-25 Joe Shaw <joe@ximian.com>
1518 * configure.in: Bump up to 1.99.16
1520 2003-03-24 Joe Shaw <joe@ximian.com>
1522 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
1523 slightly better error message on various SSL failures than the
1526 * soup-queue.c (soup_queue_error_cb): Throw the
1527 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
1529 2003-03-21 Joe Shaw <joe@ximian.com>
1531 * soup-server.c: Use non-deprecated g_main_loop_* calls
1533 (soup_server_unref): Don't unref the main loop if it's NULL.
1534 Fixes a glib warning.
1536 2003-03-18 Dan Winship <danw@ximian.com>
1538 * configure.in: comment out NSS checks. The NSS code doesn't work
1539 and there are no current plans to fix it.
1541 * README (Features): Mention GnuTLS, remove NSS and the rest of
1542 the "Planned Features" section.
1544 * MAINTAINERS: remove Alex
1546 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
1547 timeout to 10 seconds (and get rid of the 3 tries) so we don't
1548 fail to connect just because the server is slow/far away.
1550 2003-03-17 Joe Shaw <joe@ximian.com>
1552 * configure.in: Bump up to 1.99.15.
1554 2003-03-12 Ian Peters <itp@ximian.com>
1556 * libsoup/soup-gnutls.c: because creating client credentials is
1557 expensive, keep the same one around as long as possible, only
1558 recreating it if the ssl_ca_file changes. Wrap
1559 gnutls_certificate_credentials in a refcounted struct to avoid
1560 freeing it while another established connection may potentially
1561 need it (say, to rehandshake).
1563 2003-03-11 Frank Belew <frb@ximian.com>
1565 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
1568 2003-03-10 Joe Shaw <joe@ximian.com>
1570 * configure.in: Bump up to 1.99.14.
1572 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
1573 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
1576 2003-03-07 Joe Shaw <joe@ximian.com>
1578 * configure.in: Bump up to 1.99.13.
1580 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
1581 the list of conditions to watch. If the remote end hangs up the
1582 connection, we'll get a successful read of 0 bytes, not a HUP.
1583 The connection will have to be released by the point we check for
1584 it in connection_death().
1586 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
1587 (apparently) errant resetting of the read and write tags. I think
1588 this might have been causing some reentrancy and crashes.
1590 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
1591 channel to NULL encoding and not buffered.
1593 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
1596 2003-02-28 Joe Shaw <joe@ximian.com>
1598 * configure.in: Bump up to 1.99.12.
1600 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
1601 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
1602 this case we probably don't want to call the error callback, we
1603 just want to act like our transfer was cancelled.
1605 2003-02-27 Joe Shaw <joe@ximian.com>
1607 Try to apply some order to the iochannel refcounting...
1609 * configure.in: Bump up to 1.99.11.
1611 * libsoup/soup-context.c (soup_connection_get_iochannel): The
1612 connections needs to own a reference to the iochannel! If we're
1613 using HTTPS, release the ref we get from soup_socket_get_iochannel
1614 and replace it with the ref we get from soup_ssl_get_iochannel().
1615 Then, always ref the channel that we return (ugh, but that's the
1617 (connection_free): Release the connection's ref to the iochannel.
1619 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
1620 iochannel. The reference we pass back will be owned by the
1622 (soup_ssl_hup_waitpid): Release our ref.
1624 2003-02-27 Joe Shaw <joe@ximian.com>
1626 * configure.in: Bump up to 1.99.10.
1628 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
1629 iochannel, return to the status quo. Sigh.
1631 2003-02-26 Joe Shaw <joe@ximian.com>
1633 * configure.in: Bump up to 1.99.9.
1635 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
1636 it's causing problems with HTTPS and proxies; the iochannel
1637 refcounting is waaaaaay horked.
1639 2003-02-26 Frank Belew <frb@ximian.com>
1641 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
1643 2003-02-11 Joe Shaw <joe@ximian.com>
1645 * configure.in: Bump up to 1.99.8 for snaps.
1647 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
1648 It returns the address to the resulting hostent or NULL on failure,
1649 unlike Linux which returns an error code.
1651 2003-02-11 Joe Shaw <joe@ximian.com>
1653 * configure.in: Bump up to 1.99.7 for snaps.
1655 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
1656 the error string from OpenSSL if we can't establish a connection.
1658 2003-02-04 Joe Shaw <joe@ximian.com>
1660 * configure.in: Bump up to 1.99.6 for snaps.
1662 * libsoup/soup-server.c (destroy_message): We already assigned
1663 chan, so don't reassign it, and unref it in all cases.
1664 (issue_bad_request): Always unref after a call to
1665 soup_socket_get_iochannel(), because it refs it.
1666 (conn_accept): Fix some funky GIOChannel reffing here.
1668 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
1669 g_io_channel_ref() on the socket. This is the exact opposite of
1670 what we want to do. Create a temporary structure containing the
1671 parent pid and the old socket and unref the socket when our
1672 callback is called. This should fix GIOChannels being leaked on
1675 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
1678 2003-01-22 Joe Shaw <joe@ximian.com>
1680 * configure.in: Bump up to 1.99.5 for the snaps.
1682 * libsoup/soup-address.c (soup_address_new): If we found the
1683 address in our hash, we need to return NULL or else Soup will
1684 think we're doing an async lookup and do some cancellation on
1685 us. Besides, we were returning the wrong type anyway and it
1686 was crashing things.
1688 2003-01-17 Joe Shaw <joe@ximian.com>
1690 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
1691 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
1692 out, so keep trying until we succeed.
1694 2003-01-10 Joe Shaw <joe@ximian.com>
1696 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
1697 strings and print out the error when the cert can't verify.
1699 2003-01-09 Dan Winship <danw@ximian.com>
1701 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
1702 overrun noticed by valgrind
1704 2002-12-20 Joe Shaw <joe@ximian.com>
1706 * libsoup/soup-server.c (soup_server_new_with_host): Added.
1707 Starts a server only on the interface specified, instead of all
1710 2002-12-16 Jeremy Katz <katzj@redhat.com>
1712 * configure.in: use $libdir instead of /usr/lib when looking for
1715 2002-12-11 Joe Shaw <joe@ximian.com>
1717 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
1718 Don't set a variable to NULL and then immediately try to
1721 2002-12-09 Joe Shaw <joe@ximian.com>
1723 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
1724 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
1725 we don't hang forever if we don't get more data.
1727 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
1728 or else we'll hang forever in SSL_connect() if the other side
1731 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
1732 release the connection on message free, even if the connection was
1735 2002-12-03 Joe Shaw <joe@ximian.com>
1737 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
1738 g_io_channel_set_close_on_unref() on the second half of the socket
1739 pair so we don't leak file descriptors.
1741 2002-12-03 Frank Belew <frb@ximian.com>
1743 * libsoup/soup-address.c: add signal.h to the list of headers to
1746 2002-11-25 Joe Shaw <joe@ximian.com>
1748 * Makefile.am: Build the tests directory again
1750 2002-11-21 Rodney Dawes <dobey@ximian.com>
1752 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
1754 2002-11-20 Michael Meeks <michael@ximian.com>
1756 * configure.in: require autoconf 2.52 not 2.53.
1758 2002-11-18 Dan Winship <danw@ximian.com>
1760 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
1761 since it's apparently non-portable. Use s6_addr instead.
1762 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
1764 * libsoup/soup-error.c: Fix spelling of
1765 SOUP_ERROR_MOVED_PERMANENTLY and its description.
1767 * libsoup/soup-message.c (soup_message_get_request_header, etc):
1768 Remove long-deprecated API.
1770 * libsoup/soup-socket.c (soup_socket_connect): remove unused
1773 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
1774 * libsoup/soup-server.c (cgi_read): Likewise
1775 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
1777 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
1778 * libsoup/soup-transfer.c (soup_transfer_read_cb,
1779 soup_transfer_write_cb): Likewise.
1781 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
1782 instead of IPv4. (Tested on OS X.)
1784 2002-11-15 Dan Winship <danw@ximian.com>
1786 * libsoup/*: Change old Helix Code refs to Ximian (and update
1789 2002-11-15 Frank Belew <frb@ximian.com>
1791 * tests/Makefile.am: uncomment lines to make timeserver build
1794 2002-11-14 Joe Shaw <joe@ximian.com>
1796 * libsoup/soup-address.c (soup_address_new): When we get an
1797 address from the hash, call our address lookup callback or else
1798 the connection will hang.
1800 2002-11-13 Dan Winship <danw@ximian.com>
1802 * tests/timeserver.c: Oops, commit this.
1804 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
1806 2002-11-13 Joe Shaw <joe@ximian.com>
1808 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
1809 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
1812 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
1813 to properly shut down the SSL connection before closing the
1816 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
1817 iochannels before quitting the main loop.
1819 * tests/Makefile.am: disable building timeserver, the source file
1822 2002-11-12 Dan Winship <danw@ximian.com>
1824 * configure.in: Check for IPv6 support in networking headers.
1826 * libsoup/soup-address.c: Make the internal structure of
1827 SoupAddress entirely private, and make SoupAddress be more like a
1828 hostent and less like a sockaddr. (Ie, make it not have a port
1829 associated with it.) Document undocumented functions. Add
1830 completely-untested support for IPv6.
1831 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
1832 SoupAddress and a port.
1833 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
1834 addresses corresponding to the IPv6 and IPv6 "any" addresses.
1835 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
1836 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
1837 may be a sockaddr_in or sockaddr_in6.
1838 (soup_address_gethostname, soup_address_gethostaddr): Remove
1839 these. They aren't reliable, especially on multihomed hosts.
1840 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
1841 (soup_address_new): Keep pending lookups in a separate hash table
1842 from completed lookups. Fix a bug when canceling a lookup when
1843 there was more one outstanding request for it.
1844 (soup_address_lookup_in_cache): Removed.
1846 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
1847 it's not in SoupAddress any more).
1848 (soup_socket_connect): Simplify this. Don't use
1849 soup_address_lookup_in_cache, just call soup_address_new, since we
1850 already know the code can deal with the callback being invoked
1852 (soup_socket_new_sync, soup_socket_new): Take a port argument.
1853 (soup_socket_server_new): Take a SoupAddress to use as the local
1854 address to bind to. This lets the caller choose between the IPv4
1855 and IPv6 "any" addresses, and also lets you bind to a single
1856 interface of a multi-homed machine.
1857 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
1860 * libsoup/soup-server.c (soup_server_new): Pass
1861 soup_address_ipv4_any() to soup_socket_server_new().
1863 * libsoup/soup-socks.c (soup_connect_socks_proxy,
1864 soup_socks_write): Fix up for the API changes, but it won't work
1867 * tests/timeserver.c: Another really simple test, for the server
1870 * tests/Makefile.am: build timeserver
1872 2002-11-11 Dan Winship <danw@ximian.com>
1874 * libsoup/soup-address.c: Move the SoupAddress code from
1875 soup-socket.c and soup-socket-unix.c to here.
1877 * libsoup/soup-socket.c: Move the remaining code from
1878 soup-socket-unix.c here.
1880 * libsoup/soup-socket-unix.c: Gone
1882 * tests/get.c: really really trivial test program
1884 * configure.in (AC_OUTPUT):
1885 * Makefile.am (SUBDIRS): add tests/
1887 2002-11-05 Dan Winship <danw@ximian.com>
1889 * Split libsoup out of soup. ChangeLog.old contains the original
1892 * Makefile.am, etc: Fix things up to work with the new directory
1893 layout. Disable docs until we fix them.
1895 * autogen.sh: Use gnome-autogen.sh
1897 * configure.in: Require autoconf 2.53. Remove stuff that was only
1898 needed for httpd or wsdl code. Remove glib1 support. Bump version
1901 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
1902 in ${includedir}/soup-2.0
1904 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
1905 SOAP-specific stuff, Windows support, and other things that
1906 weren't being maintained.
1908 * soup-config.in, soupConf.sh: Kill these. We only support