View Issue Details

IDProjectCategoryView StatusLast Update
0005922JEDI VCL00 JVCL Componentspublic2015-09-21 17:47
ReportertetarddAssigned Toobones 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.45 
Target VersionFixed in Version3.49 
Summary0005922: HTTPStatus in TJvHttpUrlGrabber should be an integer (or DWord)
DescriptionAn HTTP status is managed an a DWord by the OS, e.g. the common 404 error. It's easy to see, the error codes are available as integers in WinInet (search for HTTP_STATUS_NOT_FOUND).

It is therefore weird that TJvHttpUrlGrabber.FHTTPStatus is defined as string.

Change the type as Integer/DWord and change the code that gets in:

procedure TJvHttpUrlGrabberThread.Grab;
Var
   ...
   StatusValue : DWord;
Begin
    ...
    dwIndex := 0;
    dwBufLen := SizeOf(StatusValue);
    HttpQueryInfo(hDownload, HTTP_QUERY_STATUS_CODE Or HTTP_Query_Flag_Number, @StatusValue, dwBufLen, dwIndex);
    Grabber.FHTTPStatus := StatusValue;
    ...
End
     
TagsNo tags attached.

Activities

obones

2013-01-15 15:08

administrator   ~0020339

What about existing code that uses this? Shouldn't we add a new property that has the appropriate type?

2013-01-19 08:34

 

JvUrlGrabbers.pas (40,718 bytes)

tetardd

2013-01-19 08:34

reporter   ~0020407

Attached is my proposed changes. These are marked with Tetard for your consideration.

Thanks.

obones

2013-12-16 11:57

administrator   ~0020850

This is now in GIT

Issue History

Date Modified Username Field Change
2012-06-28 15:00 tetardd New Issue
2013-01-15 15:08 obones Note Added: 0020339
2013-01-15 15:08 obones Status new => feedback
2013-01-19 08:34 tetardd File Added: JvUrlGrabbers.pas
2013-01-19 08:34 tetardd Note Added: 0020407
2013-12-13 11:41 obones Status feedback => acknowledged
2013-12-16 11:57 obones Note Added: 0020850
2013-12-16 11:57 obones Status acknowledged => resolved
2013-12-16 11:57 obones Fixed in Version => Daily / GIT
2013-12-16 11:57 obones Resolution open => fixed
2013-12-16 11:57 obones Assigned To => obones
2015-09-21 17:47 obones Fixed in Version Daily / GIT => 3.49