aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ChangeLog4
-rw-r--r--util/http.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index 1afdf7602..0c1597a51 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jan 20 21:40:21 CET 1999 Werner Koch <[email protected]>
+
+ * http.c (http_wait_response): Moved the shutdown behind the dup
+
Wed Jan 20 18:59:49 CET 1999 Werner Koch <[email protected]>
* http.c (send_request): Removed double LF
diff --git a/util/http.c b/util/http.c
index 4f04b62e9..408209213 100644
--- a/util/http.c
+++ b/util/http.c
@@ -118,14 +118,14 @@ http_wait_response( HTTP_HD hd, unsigned int *ret_status )
http_start_data( hd ); /* make sure that we are in the data */
iobuf_flush( hd->fp_write );
- shutdown( hd->socket, 1 );
- hd->in_data = 0;
hd->socket = dup( hd->socket );
if( hd->socket == -1 )
return G10ERR_GENERAL;
iobuf_close( hd->fp_write );
hd->fp_write = NULL;
+ shutdown( hd->socket, 1 );
+ hd->in_data = 0;
hd->fp_read = iobuf_fdopen( hd->socket , "r" );
if( !hd->fp_read )
@@ -674,6 +674,7 @@ write_server( int socket, const char *data, size_t length )
select(0, NULL, NULL, NULL, &tv);
continue;
}
+ log_info("write failed: %s\n", strerror(errno));
return G10ERR_NETWORK;
}
nleft -=nwritten;