I am getting network failure message in chrome but working on other browser using php download script.
I have below headers set to download.
cache-control: must-revalidate, post-check=0, pre-check=0
content-disposition: attachment; filename="export.csv"
content-length: 388436
content-type: application/octet-stream
date: Thu, 19 Jul 2018 13:41:02 GMT
expires: Wed, 19 Jul 2017 13:40:59 GMT
last-modified: Thu, 19 Jul 2018 13:41:02 GMT
pragma: public
server: nginx
set-cookie: admin=p5t1vd4e4u3j9g6gto5h046ki0; path=/admin; domain=xyz.com; secure; HttpOnly
status: 200
x-powered-by: PHP/7.0.29
I am getting error in chrome version 67.3396.99
I have a windows service .Net client comunicating with a PHP web service. The basic idea, the .Net client send information to php to write in data base, this process take araund 1min, the problem is that, when it takes more, the HttpResponseMessage comes with BadGateway, the funny thing is php actually write all that has to write in the database even when it takes more than 1min. I try to set the TimeOut of HttpClient to 10min:
//code for the stuff making
Logger.WriteLog("Sending Stuff");
using (var client = new HttpClient())
{
client.Timeout = new TimeSpan(0,10,0);
httpResponseMessage = client.PostAsync(url, content).Result;
Logger.WriteLog(httpResponseMessage.StatusCode.ToString());
Logger.WriteLog(httpResponseMessage.ToString());
}
But still, it fail with more than 1min response, the php web service it suppose to have a timeout of 10min too. I log the full response and i got the bad Gateway:
2016-04-25 11:12:24,045 INFO - *Sending Stuff
2016-04-25 11:13:23,413 INFO - OK
2016-04-25 11:13:23,414 INFO - StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Pragma: no-cache
Connection: close
Cache-Control: no-store, must-revalidate, no-cache, post-check=0, pre-check=0
Date: Mon, 25 Apr 2016 14:12:37 GMT
Set-Cookie: PHPSESSID=lbhsue3pstc8smqihkoe0nouj1; path=/
Server: Apache/2.2.15
Server: (CentOS)
X-Powered-By: PHP/5.6.19
Content-Length: 52
Content-Type: application/json; charset=UTF8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
2016-04-25 11:14:42,931 INFO - *Sending Stuff
2016-04-25 11:15:44,273 INFO - BadGateway
2016-04-25 11:15:44,274 INFO - StatusCode: 502, ReasonPhrase: 'Proxy Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Connection: close
Date: Mon, 25 Apr 2016 14:14:43 GMT
Content-Length: 499
Content-Type: text/html; charset=iso-8859-1
}
//------------------------------------------------------------------------------------------------------------------------------------------------
2016-04-25 11:25:28,471 INFO - *Sending Stuff
2016-04-25 11:26:27,495 INFO - OK
2016-04-25 11:26:27,497 INFO - StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Pragma: no-cache
Connection: close
Cache-Control: no-store, must-revalidate, no-cache, post-check=0, pre-check=0
Date: Mon, 25 Apr 2016 14:25:41 GMT
Set-Cookie: PHPSESSID=ja6f30mqlnhtdl8p44hddr43c3; path=/
Server: Apache/2.2.15
Server: (CentOS)
X-Powered-By: PHP/5.6.19
Content-Length: 52
Content-Type: application/json; charset=UTF8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
}
My hope was that, timeout where the reason of the badgateway but it make not difference. Can someone tell me what are the possibilities of the badgateway, even when the process in php finish the task. Thanks in advance!
PD:Sorry for my english
A timeout on the .NET end shouldn't generate an HTTP status code. It should throw a separate timeout exception. If you see an HTTP status code, that has to come from the server side.
Are you sure the web server itself (on the PHP end) isn't configured with a timeout for scripts?
So here is the issue, Magento doesn't seem to set-cookie on product/category page.
It doesn't show any cart items or customer login information on product page, however all the items appear fine on home page and rest of the pages on site.
I checked headers for two of the pages.
Here is the product page:
HTTP/1.1 200 OK
Server: nginx/1.8.1
Date: Tue, 15 Mar 2016 05:01:57 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
Vary: Accept-Encoding
X-Cacheable: NO:Cache-Control=no-cache
Accept-Ranges: bytes
X-Served-From-Cache: Yes
Here is the home page headers (which is working fine)
HTTP/1.1 200 OK
Server: nginx/1.8.1
Date: Tue, 15 Mar 2016 05:02:12 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
Set-Cookie: frontend=n7m2mbnoo861h84r9ma40of221; expires=Wed, 16-Mar-2016 05:02:12 GMT; path=/store/; domain=-----; HttpOnly
Vary: Accept-Encoding
X-Cacheable: NO:Cache-Control=no-cache
Accept-Ranges: bytes
X-Served-From-Cache: Yes
Any idea what's happening?
I have tried increasing cookie lifetime to 86400
and cookie path to /store/ and cookie domain to (www.mydomain.com)
It turns out issue was misconfiguration of varnish on server. It was serving cached pages. Solution: Restarted varnish.
I have the below PHP code to load image
header('Content-Type: image/'.$contentFormat);
header('Content-Length: '. filesize($image));
readfile($image);
When I request the url in console I get the bellow header response
HTTP/1.1 200 OK
Date: Fri, 28 Nov 2014 13:13:59 GMT
Content-Type: image/jpeg
Content-Length: 107885
Connection: keep-alive
Keep-Alive: timeout=30
Server: Apache/2
X-Powered-By: PHP/5.3.13
Set-Cookie: PHPSESSID=617a3a6eba912178f810f10cc5d171f3; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Accept-Ranges: bytes
Age: 0
ÿØÿà
including ÿØÿà,
What could be the problem? I searched all my php files for whitespace. Any guess or suggestions where I can search for the whitespace
I'm getting 2 PHPSESSID set cookies headers from a login request from my yii application.
Date: Thu, 05 Dec 2013 02:19:44 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3
Set-Cookie: PHPSESSID=3lkhjlsv967n56horpcl3n7gl5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=sctb6cd1snbd5g2esv1mn2lug7; path=/
Content-Length: 3
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
And browser doesn't keep any and doesn't send back them for future requests. Any idea how this is happening?