Malformed Request (400) problem!

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Malformed Request (400) problem!

Postby chaeron » Jun 07 09 2:47 am

Hi:

I upgraded my WinGate install to the latest 6.6.1 release, and then started to get Malformed Request (400) errors when I try to access a google SVN (Subversion) repository. The error from SVN looks like:

Operation failed: svn: REPORT of '/svn/!svn/vcc/default': 400 Malformed Request (http: xprocxq.googlecode.com)

Log entries in the WWW Proxy WinGate log look like this:

06/06/09 08:16:05 10.66.66.5 Administrator 0000124606 Requested: http: xprocxq.googlecode.com/svn/trunk
06/06/09 08:16:06 10.66.66.5 Administrator 0000124606 Traffic 844 582 551 820 1s
06/06/09 08:16:06 10.66.66.5 Administrator 0000124606 Error: responding with code 400 Malformed Request

Looks like the new 6.6.1 release has introduced this problem.

Temporarily, I have reverted to WinGate version 6.2.2 which does not cause this problem, however, some guidance on how to resolve this in 6.6.1 would be very much welcome.

Are there special WinGate config settings in 6.6.1 that would resolve this problem?

Thanks!
....Andrzej
chaeron
 
Posts: 8
Joined: Jul 06 05 10:38 am

Re: Malformed Request (400) problem!

Postby adrien » Jun 07 09 11:11 am

Hi

We had another customer with this problem with a custom HTTP client. It was making HTTP/1.0 requests without a Host header (which is legal), but WinGate was upgrading the HTTP version number to 1.1 without adding the required Host header.

We've a build which fixes this problem at

http://www.wingate.com/downloads/WinGat ... 80-USE.EXE

Another option is if the SVN client can be made to make HTTP/1.1 requests?

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Malformed Request (400) problem!

Postby chaeron » Jun 23 09 5:04 am

That URL 404's.

Can you repost the fixed build please?

Thanks!
....Andrzej
chaeron
 
Posts: 8
Joined: Jul 06 05 10:38 am

Re: Malformed Request (400) problem!

Postby adrien » Jun 23 09 8:58 am

adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Malformed Request (400) problem!

Postby chaeron » Jun 23 09 12:03 pm

Thanks!
....Andrzej
chaeron
 
Posts: 8
Joined: Jul 06 05 10:38 am

Re: Malformed Request (400) problem!

Postby chaeron » Jun 24 09 6:06 am

Adrien:

The new build (6.6.2 bld 1281) failed to resolve the problem.

I upgraded my firewall machine to use this new build, then tried an SVN update which hits the google code servers, and got the same error message:

Operation failed: svn: REPORT of '/svn/!svn/vcc/default': 400 Malformed Request (http://xprocxq.googlecode.com)

from SVN.

So this issue does not seem to be related to the other customer's problem.

Any ideas?

In the meantime, I'll revert Wingate back again to 6.2.2. <sigh>

Oh...and I'm not receiving notifications of new postings to this thread, even though Iam subscribed.
....Andrzej
chaeron
 
Posts: 8
Joined: Jul 06 05 10:38 am

Re: Malformed Request (400) problem!

Postby adrien » Jun 24 09 9:55 am

Hi

Which SVN client are you using? We'll need to try and reproduce.

If you could do a packet capture (e.g. Wireshark) that would be great as well, between WinGate and the server.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Malformed Request (400) problem!

Postby adrien » Jun 24 09 12:58 pm

Hi

Looks like most clients use the Subversion libraries, which nowadays use one of 2 libraries for HTTP / Webdav: Neon, and Serf.

I looked through the source for Serf, which looks like there's a bug in the request format. Until I can see a packet capture I'm only speculating, but it looks like it puts together URLs like

http: something

rather than

http://something

WinGate 6.5.2 and prior didn't check for the // but WinGate 6.6 onwards does, and gives a 400 error. It's invalid to have a space in a URL. So if you're using serf, you could try using Neon instead.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Malformed Request (400) problem!

Postby adrien » Jun 24 09 1:00 pm

p.s. the packet capture if you can do one would best be done between WinGate and the client, not the server as I previously suggested.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Malformed Request (400) problem!

Postby chaeron » Jun 25 09 10:56 am

I'm not set up to do packet capture at the moment.

I'm doing updates on the following project SVN url: https://exist.svn.sourceforge.net/svnro ... runk/eXist

When I do the update, regardless of what client I use, it gives me the Malformed Request 400 error when it tries to access the external project (xproc) which is hosted on the google servers.

I've tried this with the latest Syncro SVN Client IDE (from the guys that do the Oxygen XML editor) and also with the 1.5.5 release of the SlikSvn command line tool, so I'm pretty sure it's related to what google is doing with the external project link interacting with Wingate.

That should give you enough info to replicate the problem and do a packet capture.

Thanks Adrien....
....Andrzej
chaeron
 
Posts: 8
Joined: Jul 06 05 10:38 am

Re: Malformed Request (400) problem!

Postby adrien » Jun 25 09 2:31 pm

Hi

Is there anything I can do to verify? I installed Syncro SVN client, but I'm not at all familiar with how to run it.

Also I can't be editing their code to test updates. Is there some other non-destructive test I can do which gives this problem?

Also I don't know how to run that client, I don't even see any menu option for "update".

I tried accessing that URL with non-https and it worked fine, so the OPTIONS and PROPFIND commands are going through fine.

If you could just install wireshark on your client, and take a capture it would save me a lot of time trying to replicate this.

Or just give me a URL I can hit which gives this problem?

Or clear step-by-step for me to repro?

Sorry.
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Malformed Request (400) problem!

Postby adrien » Jun 25 09 3:39 pm

Hi

I did try direct access to some google code repositories.

It was unexpectedly difficult finding an SVN URL for some project on google code to test against.

I didn't find one that worked properly, although some did some steps (i.e. OPTIONS etc worked, but got 404 errors later on).

I did see quite a few where even connecting directly to the server gave back a 400 bad request (generated from the Google server).

So... did you try other methods?

E.g. set Synchro SVN client to use SOCKS. WinGate has a SOCKS server. You'll need to turn off connection interception in the WWW proxy though.

I also found that the Synchro client sends a Proxy-Authorization header with garbage in it even if you specify no username/password. This causes WinGate to fail it on auth until you enter a proper user/pass into the client software. This is a bug in the client software.
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Malformed Request (400) problem!

Postby entryway » Jan 06 10 1:50 am

I have this problem too with some SVNs.

Unchecking "Services \ WWW Proxy Server \ Sessions \ [ ] Intercept connections made via bla-bla-bla" fixes the problem half, because:
1. I need intercept connections.
2. I can checkout/update/etc, but can't "Show Log". There are no any error messages. Log of revisions is just empty.

I am using WinGate 6.6.3 (Build 1321) and TortoiseSVN 1.6.6, Build 17493.

This problem do not occur on my home computer without WinGate with direct connection to Internet.
entryway
 
Posts: 2
Joined: Jan 06 10 1:30 am

Re: Malformed Request (400) problem!

Postby logan » Jan 06 10 1:54 pm

Can you try installing 6.6.4 just to make sure the problem that you are experiencing hasn't already been resolved?
logan
Qbik Staff
 
Posts: 671
Joined: Oct 19 06 2:49 pm
Location: Auckland, New Zealand

Re: Malformed Request (400) problem!

Postby entryway » Jan 07 10 2:45 am

logan wrote:Can you try installing 6.6.4 just to make sure the problem that you are experiencing hasn't already been resolved?

The problem exists in 6.6.4 too.

WinGate 6.6.4:
NAT is enabled
WWW Proxy server, port 3128 with intercept connections bla bla for port 80

TortoiseSVN 1.6.6, Build 17493 - 32 Bit:
Proxy is not enabled

Example of non-working SVN repository:
hxxp://mancubus.net/svn/hosted/gzdoom/trunk

Example of working SVN repository:
hxxps://www.crowproductions.de/repos/pr ... 24/prboom2

Screenshot:
hxxp://prboom-plus.sf.net/wingate_400_m ... equest.png
entryway
 
Posts: 2
Joined: Jan 06 10 1:30 am

Re: Malformed Request (400) problem!

Postby chaeron » Jan 17 10 8:44 am

logan wrote:Can you try installing 6.6.4 just to make sure the problem that you are experiencing hasn't already been resolved?


I'm running 6.6.4 build 1338, which is the latest version.

Same problem exists with this version.

However, entryway's workaround to Uncheck "Services \ WWW Proxy Server \ Sessions \ [ ] Intercept connections made via bla-bla-bla" fixes the problem for me. Since I'm not running Kaspersky or other plugins that need the intercept, I'm OK with this.

The problem is obviously with the intercept connections code in Wingate. It's changing something in the request before it gets sent to the destination.

A public SVN repository that showed this error when trying to do an svn update can be checked out with the following command:

svn co http://svn.montala.net/svn/resourcespace .

and then you can do a "svn update" in the directory you did the checkout in to replicate the malformed request error, if intercept connections for port 80 is turned on (as I believe it is by default).

Thanks.....hope this helps to finally isolate and fix this bug.
....Andrzej
chaeron
 
Posts: 8
Joined: Jul 06 05 10:38 am


Return to WinGate

Who is online

Users browsing this forum: No registered users and 4 guests