After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653130 - [Libsoup] Tunneled message's response header doesn't cleaned up.
[Libsoup] Tunneled message's response header doesn't cleaned up.
Status: RESOLVED DUPLICATE of bug 631368
Product: libsoup
Classification: Core
Component: HTTP Transport
2.34.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2011-06-21 21:56 UTC by DongJae, KIM
Modified: 2011-08-08 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch about tunneled message's response header clean up before send (947 bytes, patch)
2011-06-21 23:34 UTC, DongJae, KIM
none Details | Review

Description DongJae, KIM 2011-06-21 21:56:02 UTC
[Precondition] when device use proxy mode for network connection 

1) connection to http://mobile.twitter.com 
2) sign in
3) cann't sign in, because white or wrong page was display.

Soup message was changed to tunneled message, when device use proxy mode and https connection.

before soupmessage was sent, soupmessage's response header must be cleaned up.

but not cleaned up tunneled message's response header.
Comment 1 DongJae, KIM 2011-06-21 22:00:28 UTC
in this case:: 


	tunnel_addr = soup_connection_get_tunnel_addr (conn);
	if (tunnel_addr) {
		SoupMessageQueueItem *tunnel_item;

		item->state = SOUP_MESSAGE_TUNNELING;

		tunnel_item = soup_session_make_connect_message (session, conn);
		tunnel_item->related = item;
		soup_session_send_queue_item (session, tunnel_item, tunnel_message_completed);

static void
tunnel_message_completed (SoupMessage *msg, gpointer user_data)
{
 ...

	item->related->state = SOUP_MESSAGE_READY;

done:
	soup_message_finished (msg);
	if (item->related->msg->status_code)
		item->related->state = SOUP_MESSAGE_FINISHING;
...
}

always item->related->msg-->status_code has 304 or 302, so item->related->state = SOUP_MESSAGE_FINISHING.

because of this, whit page or wrong page was displayed, not process tunneled message.

add below code ::
void
soup_message_send_request (SoupMessageQueueItem      *item,
			   SoupMessageCompletionFn    completion_cb,
			   gpointer                   user_data)
{
	soup_message_cleanup_response (item->msg);
	if (item->related)
		soup_message_cleanup_response(item->related->msg);
	soup_message_io_client (item,
				get_request_headers,
				parse_response_headers,
				item,
				completion_cb, user_data);
}
Comment 2 DongJae, KIM 2011-06-21 23:34:21 UTC
Created attachment 190403 [details] [review]
patch about tunneled message's response header clean up before send
Comment 3 DongJae, KIM 2011-06-21 23:36:00 UTC
I add patch.
Comment 4 Dan Winship 2011-06-29 12:58:24 UTC
hm... I don't quite understand what's going on here. Can you provide a test case for this (eg, add something to tests/proxy-test.c) ?

or at least, can you attach a tcpdump or SoupLogger output showing the exact HTTP conversation that happens without the patch?
Comment 5 Dan Winship 2011-08-08 21:54:26 UTC

*** This bug has been marked as a duplicate of bug 631368 ***