fgokey / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

Redirects to a different server are not handled #242

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When CrashSender receives a 301 or 302 redirect to a different server, it 
attempts to load the path on the original server.

What steps will reproduce the problem?

1. Have server A redirect to server B
2. Submit a crash report to server A (via HTTP)

What is the expected output? What do you see instead?

The crash report should be received by server B. Instead, if you look at the 
logs of server A, it has been contacted again.

What version of CrashRpt are you using?

1.4.2

What is your version of Visual Studio?

VS2010

What is your version of Windows operating system?

Windows 8.1 x64

Please provide any additional information below.

Original issue reported on code.google.com by c...@c-riddell.com on 26 Aug 2014 at 6:27

GoogleCodeExporter commented 9 years ago
The problem is in HttpRequestSender.cpp. It parses the redirect URL but does 
not create a new connection. I've attached a version of HttpRequestSender.cpp 
that works for me. In it, I've expanded the loop to include the setting up of 
the connection.

For redirects that are on the same server, this will mean we are unnecessarily 
setting up a new connection. However, crash reports should be rare and I think 
the wasted effort is worth it to keep the code as simple as possible.

Original comment by c...@c-riddell.com on 26 Aug 2014 at 6:30

Attachments: