How to send data to PHP without content?

I know that this is possible, but I cannot understand it.

I have a mySQL query that has a couple hundred thousand results. I want to be able to post the results, but it seems like a content length header is required to respond to the download.

In phpMyAdmin, if you are going to export the database, it immediately starts the download, FF just says about the unknown file size, but it works. I looked at this code, but could not understand.

reference

Thanks.

+3
source share
6 answers

14.14 , HTTP , , 4.4. , , .

.

, , ? , , ?

:

  • ,
  • flush(),
  • goto 1

, , , , 100 1000 , ..

, , Content-disposition: attachment. .

+9

. "-: chunked", chunked, , , . , .

RFC 2616.

+2

, gzip, , . .htaccess .

+1

Content-Length. , , . , "" , .

0

LiveHTTPHeaders FireFox, , phpMyAdmin, , . , , . , , : "Transfer-Encoding: chunked", , . FireFox, : LiveHTTPHeaders

0
source

The length of the http content is the SHOULD field, so you can delete it ... but you have to set the transfer encoding, then see Why is "Content-Length: 0" in POST requests?

0
source

Source: https://habr.com/ru/post/1704821/


All Articles