Using "X-LiteSpeed-Location" with other Header-definitions

50 views
Skip to first unread message

SebastianK

unread,
Apr 27, 2017, 3:23:07 AM4/27/17
to openlitespee...@googlegroups.com
Hello,

I have a problem with configuring X-LiteSpeed-Location header.
The header works well, but if I add other headers, they will be ignored.

Following code I use in my PHP-script:

   header('X-LiteSpeed-Location: /download/'.$data["download_zip_file"]);
   header('Content-Description: File Transfer');
   header('Content-Type: application/octet-stream');
   header('Content-Disposition: attachment; filename="'.$data["download_file_name"].'"');
   header('Expires: 0');
   header('Cache-Control: must-revalidate');
   header('Pragma: public');
   header('Content-Length:'.filesize('download/'.$data["download_zip_file"]));

What I get back is this:

   Accept-Ranges = bytes
   Connection = Keep-Alive
   Content-Length = 1617311820
   Content-Type = application/zip
   Date = Thu, 27 Apr 2017 06:38:15 GMT
   Etag = "6066384c-5900cfe4-800b03"
   Last-Modified = Wed, 26 Apr 2017 16:50:44 GMT
   Server = LiteSpeed

Only the Content-Length-header was sent to the client. All other defined Headers were dropped.
The most important header for me is the Content-Disposition-header, but I think it would be nice, if all custom headers will be sent to the client.

Have you any idea, how I can get it working?

Thanks,
Sebastian

PS: There is a post with the same topic in the litespeed-forum. There they speak from a bug which is fixed in the current stable (5.1.15)

SebastianK

unread,
May 11, 2017, 6:04:42 AM5/11/17
to OpenLiteSpeed Development
Hello,

is there any solution for this big problem?
The last days I have tried to find a solution by myself, but any solution without "X-LiteSpeed-Location" will end in higher load on the server and a slowdown of the Web Application. Any Solution with "X-LiteSpeed-Location" causes in loosing headers. Even if I try to combine both solutions with curl.

Tested solutions:
  • readfile (with ob_end_flush)
  • fopen/fread (with ob_end_flush)
  • curl (with connection to a File with X-Litespeed-Location)
  • X-Litespeed-Location

I have to transfer very big files (up to several GB) over the net and the problem ist, that the download only may work, if the downloader is logged in. Therefore I have stored the files in an protected folder.

If anyone has a idea, or a hint, it will be great, if he can write it down here! ;-)

Regards,
Sebastian

George Wang

unread,
May 22, 2017, 2:47:19 PM5/22/17
to openlitespee...@googlegroups.com

"X-LiteSpeed-Location" will work as wish, will be available in 1.4.26 .

We can send you a patch if need that feature before the official 1.4.26 release.

Best regards,

George Wang
--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.
To post to this group, send email to openlitespee...@googlegroups.com.
Visit this group at https://groups.google.com/group/openlitespeed-development.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages