View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032656 | FPC | FCL | public | 2017-11-07 12:24 | 2017-12-29 10:29 |
Reporter | Tudor Hulban | Assigned To | Michael Van Canneyt | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | 64 bit | OS | Windows | OS Version | 7 |
Product Version | 3.0.2 | Product Build | 3.0.4 | ||
Target Version | 3.2.0 | Fixed in Version | 3.1.1 | ||
Summary | 0032656: Chunk too big reported for HTTP GET. RFC2616 does not limit chunk | ||||
Description | hi All, while doing a GET with TFPHttpClient I am getting a EHTTPClient.Create(SErrChunkTooBig) for a 10 M reguest (for a bandwidth check). as per RFC2616 there is no chunk size limit. please advise on the limitation or could it be reviewed and for persons interested the initial stream size could be used for triggering the error? from fphttpclient.pp around line 1057, Lazarus 1.8RC5 with FPC 3.0.4: if ChunkSize>1000000 then Raise EHTTPClient.Create(SErrChunkTooBig); see: http://forum.lazarus.freepascal.org/index.php/topic,38853.msg265195/topicseen.html#new | ||||
Steps To Reproduce | procedure TGETSpeed.CheckSpeed(AURL: string; ABytes: longword); var t1, t2: TDateTime; url: string; params: string; HTTPRequest: TFPHttpClient; begin try params := 's=' + EncodeURLElement(IntToStr(ABytes)); url := AURL + '?' + params; try HTTPRequest := TFPHttpClient.Create(nil); t1 := now(); HTTPRequest.Get(url); t2 := now(); TriggerError(IntToStr(MilliSecondsBetween(t2, t1))); except on E: Exception do begin HTTPRequest.Free; TriggerError('Error:' + E.Message); end; end; finally FreeAndNil(HTTPRequest); end; end; | ||||
Additional Information | with Synpase it works: procedure TGETSpeed.CheckSpeedSynapse(AURL: string; ABytes: longword); var t1, t2: TDateTime; url: string; params: string; HTTPRequest: THTTPSend; begin try params := 's=' + EncodeURLElement(IntToStr(ABytes)); url := AURL + '?' + params; try HTTPRequest := THTTPSend.Create; t1 := now(); HTTPRequest.HTTPMethod('GET',url); t2 := now(); TriggerError(IntToStr(MilliSecondsBetween(t2, t1))); except on E: Exception do begin HTTPRequest.Free; TriggerError('Error:' + E.Message); end; end; finally FreeAndNil(HTTPRequest); end; end; | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 37849 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
Fixed, I made MaxChunkSize a property, it can be set to any nonzero value to enable the check, and zero will disable the check. I also added a check for an overflow. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-11-07 12:24 | Tudor Hulban | New Issue | |
2017-11-07 15:32 | Michael Van Canneyt | Assigned To | => Michael Van Canneyt |
2017-11-07 15:32 | Michael Van Canneyt | Status | new => assigned |
2017-12-29 10:29 | Michael Van Canneyt | Fixed in Revision | => 37849 |
2017-12-29 10:29 | Michael Van Canneyt | Note Added: 0105091 | |
2017-12-29 10:29 | Michael Van Canneyt | Status | assigned => resolved |
2017-12-29 10:29 | Michael Van Canneyt | Fixed in Version | => 3.1.1 |
2017-12-29 10:29 | Michael Van Canneyt | Resolution | open => fixed |
2017-12-29 10:29 | Michael Van Canneyt | Target Version | => 3.2.0 |