Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, March 2007
Re: QHttp "Server Error 500" responses - why?


Message 1 in thread

> I'm trying to make a simple Qt 4.2 program work that uses QHttp to "get" 
> the contents of a specific URL. I can type the URL into Firefox and that 
> works. I can also use Python urllib to get the url and that works. But 
> in my Qt program I keep getting a Server Error 500 back from the server.

Does this happen with this URL only? With any URL?

If it happens with any URL, could you provide the specific URL?

Otherwise, QHttp may be probably misused. Could you show us some code? 
There's an example using QHttp in subdirectory examples/network/http. 
Are you able to download this URL using the example?

--
 [ signature omitted ] 

Message 2 in thread

Dimitri wrote:
>> I'm trying to make a simple Qt 4.2 program work that uses QHttp to 
>> "get" the contents of a specific URL. I can type the URL into Firefox 
>> and that works. I can also use Python urllib to get the url and that 
>> works. But in my Qt program I keep getting a Server Error 500 back 
>> from the server.
> 
> Does this happen with this URL only? With any URL?

ONLY with this URL - well, any URL within this specific (internal) server.

> If it happens with any URL, could you provide the specific URL?

Pretty much any other URL works.

> Otherwise, QHttp may be probably misused. Could you show us some code? 
> There's an example using QHttp in subdirectory examples/network/http. 
> Are you able to download this URL using the example?

My code is based on the example - and the example has the same Server 
Error problem when I feed it my URL. So I don't think I am "misusing" 
QHttp. Yet clearly there is something wrong, since Firefox and Python 
can both access the URL.


-- 
 [ signature omitted ] 

Message 3 in thread

Hi,

> My code is based on the example - and the example has the same Server 
> Error problem when I feed it my URL. So I don't think I am "misusing" 
> QHttp. Yet clearly there is something wrong, since Firefox and Python 
> can both access the URL.

We can't really help without the specific URL, or some other URL with 
similar behavior.

--
 [ signature omitted ] 

Message 4 in thread

"Paul Miller" <paul@xxxxxxxxxx> wrote in message 
news:45E6F7D0.9030907@xxxxxxxxxxxxx
> Dimitri wrote:
>>> I'm trying to make a simple Qt 4.2 program work that uses QHttp to 
>>> "get" the contents of a specific URL. I can type the URL into Firefox 
>>> and that works. I can also use Python urllib to get the url and that 
>>> works. But in my Qt program I keep getting a Server Error 500 back 
>>> from the server.
>>
>> Does this happen with this URL only? With any URL?
>
> ONLY with this URL - well, any URL within this specific (internal) 
> server.
>
>> If it happens with any URL, could you provide the specific URL?
>
> Pretty much any other URL works.
>
>> Otherwise, QHttp may be probably misused. Could you show us some code? 
>> There's an example using QHttp in subdirectory examples/network/http. 
>> Are you able to download this URL using the example?
>
> My code is based on the example - and the example has the same Server 
> Error problem when I feed it my URL. So I don't think I am "misusing" 
> QHttp. Yet clearly there is something wrong, since Firefox and Python 
> can both access the URL.


Look up what a response 500 means:

http://www.w3.org/Protocols/HTTP/HTRESP.html

It means "Internal Error", which is a server problem. You have to contact 
the site's administrator to find out what is going on for your specific 
connection.

That this URL works with a webbrowser could indicate that the server 
expects some meta data in the request header received (i.e. a specific 
user-agent).

Volker


--
 [ signature omitted ] 

Message 5 in thread

Hi

On Thursday 01 March 2007 17:57, Paul Miller wrote:
>
> ONLY with this URL - well, any URL within this specific (internal) server.
>

Do you have mod_security on the server configured to not accept browsers that 
don't specify user_agent?  or any "security" restrictions of this kind?


-- 
 [ signature omitted ] 

Attachment: pgpwudvUqOZy8.pgp
Description: PGP signature