Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-10

fphttpclient close connection?

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

waldo kitty

i've noted that fphttpclient has a DefaultTimeout of 15 minutes... how can i close the connection after all data is received?

the server is configured to keep-alive.

"AddHeader(fieldConnection,'close');" works but i want/need to use keep-alive and then close the connection afterwards instead of waiting for the program to timeout in 15 minutes or when the server closes the connection...

Reply by email

Unknown author
to waldo kitty
waldo kitty wrote
i've noted that fphttpclient has a DefaultTimeout of 15 minutes... how can i close the connection after all data is received?

That should happen by itself ?
Keeping the connection open is currently not supported.

The DefaultTimeOut is definitely not a property of the http client.

Michael.

Reply by email

waldo kitty
to Unknown author
Show quoted text 10 lines
On Mon, 15 Oct 2012, waldo kitty wrote: > > i've noted that fphttpclient has a DefaultTimeout of 15 minutes... how can i > close the connection after all data is received? That should happen by itself ? Keeping the connection open is currently not supported.

oh... ok... when i get a URL, the program sits long after the file has arrived... i assume it is stuck or something in the GET routine... i've been having to CTRL-C to stop the program and i don't see the returned headers at that point... the output file is properly written...

when i

   AddHeader(fieldConnection,'close');

it terminates the GET as soon as the file has arrived and the headers are shown... the server being tested against has keep-alive on by default...

The DefaultTimeOut is definitely not a property of the http client.

i thought it was used in some routines for connecting and receiving data... my bad...

Reply by email