diff -ur libsoup-2.42.2/libsoup/soup-message-io.c libsoup-2.42.2-mod/libsoup/soup-message-io.c
--- libsoup-2.42.2/libsoup/soup-message-io.c	2013-03-10 16:57:01.000000000 +0000
+++ libsoup-2.42.2-mod/libsoup/soup-message-io.c	2013-09-13 22:11:16.867007492 +0100
@@ -9,6 +9,7 @@
 #include "config.h"
 #endif
 
+#include <stdio.h>
 #include <glib/gi18n-lib.h>
 
 #include "soup.h"
@@ -166,6 +167,24 @@
 	g_object_unref (msg);
 }
 
+static void
+printGByteArray(GByteArray *array) 
+{
+	int i;
+	char *ch;
+	if (array == NULL) {
+		return;
+	}
+	for(i=0;i<array->len;i++) {
+		ch=array->data[i];
+		if (ch>=32 && ch <=126 ) {
+			printf("%c", ch);
+		} else {
+			printf("{%u}", ch);
+		}
+	}
+}
+
 static gboolean
 read_headers (SoupMessage *msg, GCancellable *cancellable, GError **error)
 {
@@ -185,6 +204,9 @@
 							    cancellable, error);
 		io->read_header_buf->len = old_len + MAX (nread, 0);
 		if (nread == 0) {
+			printf("nread==0 and io->read_header_buf=");
+			printGByteArray(io->read_header_buf);
+			printf("\n");
 			soup_message_set_status (msg, SOUP_STATUS_MALFORMED);
 			g_set_error_literal (error, G_IO_ERROR,
 					     G_IO_ERROR_PARTIAL_INPUT,
@@ -194,6 +216,9 @@
 			return FALSE;
 
 		if (got_lf) {
+			printf("got_lf and io->read_header_buf=");
+			printGByteArray(io->read_header_buf);
+			printf("\n");
 			if (nread == 1 && old_len >= 2 &&
 			    !strncmp ((char *)io->read_header_buf->data +
 				      io->read_header_buf->len - 2,
Only in libsoup-2.42.2-mod/libsoup: .soup-message-io.c.swp
