summaryrefslogtreecommitdiff
path: root/tests/simple-proxy.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-09-03 14:00:24 +0000
committerDan Winship <danw@src.gnome.org>2003-09-03 14:00:24 +0000
commit3352b0ee56a2e1e84bc20def9ae16a648ef4f51f (patch)
tree1bd38d29e15a9ae1ce8aa78c019f9d18197667cf /tests/simple-proxy.c
parent1cc11d717a29e5835d03eb244f3a05e8bd6c039c (diff)
downloadlibsoup-3352b0ee56a2e1e84bc20def9ae16a648ef4f51f.tar.gz
libsoup-3352b0ee56a2e1e84bc20def9ae16a648ef4f51f.tar.bz2
libsoup-3352b0ee56a2e1e84bc20def9ae16a648ef4f51f.zip
Renamed from soup-error.h, with types and defines renamed accordingly.
* libsoup/soup-status.h: Renamed from soup-error.h, with types and defines renamed accordingly. * libsoup/soup-message.h (SoupMessage): Rename errorcode to status_code and errorphrase to reason_phrase. Remove errorclass. (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects as being either "errors" or "not errors", so its semantics are guaranteed to be wrong sometimes. * libsoup/soup-message.c (soup_message_set_status, soup_message_set_status_full): Renamed * libsoup/soup-message-handlers.c (soup_message_add_status_code_handler, soup_message_add_status_class_handler): Rename. * libsoup/soup-session.c (soup_session_send_message): Make this return a status code rather than a status class. * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some unrelated unused fields (retries, callback, user_data). * ...: Updates
Diffstat (limited to 'tests/simple-proxy.c')
-rw-r--r--tests/simple-proxy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/simple-proxy.c b/tests/simple-proxy.c
index f0926a0a..3af0a75d 100644
--- a/tests/simple-proxy.c
+++ b/tests/simple-proxy.c
@@ -37,9 +37,10 @@ send_headers (SoupMessage *from, SoupMessage *to)
{
printf ("[%p] HTTP/1.%d %d %s\n", to,
soup_message_get_http_version (from),
- from->errorcode, from->errorphrase);
+ from->status_code, from->reason_phrase);
- soup_message_set_error_full (to, from->errorcode, from->errorphrase);
+ soup_message_set_status_full (to, from->status_code,
+ from->reason_phrase);
soup_message_foreach_header (from->response_headers, copy_header,
to->response_headers);
soup_message_remove_header (to->response_headers, "Content-Length");
@@ -84,7 +85,7 @@ server_callback (SoupServerContext *context, SoupMessage *msg, gpointer data)
soup_message_get_http_version (msg));
if (soup_method_get_id (msg->method) == SOUP_METHOD_ID_CONNECT) {
- soup_message_set_error (msg, SOUP_ERROR_NOT_IMPLEMENTED);
+ soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
return;
}