Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
4432 04 Feature Request minor always 2008-08-25 04:25 2008-09-04 04:54
miang  
obones  
normal  
resolved  
fixed  
none    
none 3.35  
0004432: HTTP Status Codes in TJvHttpUrlGrabber
I think that TJvHttpUrlGrabber should have property showing http status code.

TJvHttpUrlGrabber = class(TJvProxyingUrlGrabber)
private
FHTTPStatus:string;
publishes
property HTTPStatus: string read FHTTPStatus write FHTTPStatus;
     

procedure TJvHttpUrlGrabberThread.Grab;
(...)
HttpQueryInfo(hDownload, HTTP_QUERY_STATUS_CODE , Buffer, dwBufLen, dwIndex);
Grabber.HTTPStatus:= StrPas(Buffer);
HasSize := HttpQueryInfo(hDownload, HTTP_QUERY_CONTENT_LENGTH, Buffer, dwBufLen, dwIndex);
(...)

or maybe there is another way to check if status code returned by a sever equals 404?
Issue History
2008-08-25 04:25 miang New Issue
2008-08-29 05:05 miang Note Added: 0014527
2008-09-03 09:18 obones Note Added: 0014529
2008-09-03 09:18 obones Status new => acknowledged
2008-09-04 03:52 miang Note Added: 0014541
2008-09-04 04:54 obones Status acknowledged => resolved
2008-09-04 04:54 obones Fixed in Version => Daily / SVN
2008-09-04 04:54 obones Resolution open => fixed
2008-09-04 04:54 obones Assigned To => obones
2008-09-04 04:54 obones Note Added: 0014542

Notes
(0014527)
miang   
2008-08-29 05:05   
there should be
      dwIndex := 0;
      dwBufLen := 1024;
before second call to HttpQueryInfo
(0014529)
obones   
2008-09-03 09:18   
OnError is a good place to test if the server refused to server, but having the status code could be interesting indeed.
(0014541)
miang   
2008-09-04 03:52   
when server returns something like:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>

The requested URL /aktualizacja/pliki/JB/BSTPlusJB_full_3.7.3.ex was not found on this server.


<hr>
<address>Apache/2.2.8 (Fedora) Server at aktualizacja.jst.pl Port 80</address>
</body></html>



OnError is not fired
(0014542)
obones   
2008-09-04 04:54   
This has now been added in SVN.