简体   繁体   中英

HTTP/1.1 404 Not FoundDate: error

I'm having trouble sending XML files to a database due to a wrong time error. a short summary of the project:

I'm creating an application that retrieves, sends and updates data through the prestashop webservice. The application is an extension of an existing prestashop application. Working with the webservice all data is passed through XML documents.

i'm having the following 2 scenarios.

1. sending a new value to the database:
When i'm sending a new value to the database, lets say a new product. Everything works fine in a weird way. The HTTP response header is as follows:

HTTP/1.1 200 OKDate: Thu, 26 Oct 2017 10:35:21 GMTServer: Apache/2Access-Time: 1509014121X-Powered-By: PrestaShop WebservicePSWS-Version: 1.7.2.4Execution-Time: 0.026Content-Sha1: SomeStuff; HttpOnlyUpgrade: h2,h2cConnection: UpgradeCache-Control: max-age=2592000Expires: Sat, 25 Nov 2017 10:35:21 GMTVary: Accept-Encoding,User-AgentTransfer-Encoding: chunkedContent-Type: text/xml;charset=utf-8

But the actual time is 2 hours later. Still the XML document is send correctly, the values are added to the database and the time_add and time_upd get the correct time from the server, wich is in this case: 2 hours later at: 12:35:41.

So sending a new value is no problem.

2. Updating values (here is where the issue occures)
When updating a value i will first select the right database row. Then i will update the values with some new values.

All works fine, the form sends the values, the HTTP header catches them and tries to send the values through the XML send section. BUT the HTTP response header again retrieves the time from 2 hours ago in this case the following error is shown:

HTTP RESPONSE HEADER
HTTP/1.1 404 Not Found
Date: Thu, 26 Oct 2017 10:40:52 GMT
Server: Apache/2
X-Powered-By: PHP/7.0.23
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Link: <https://MySite.nl/wp-json/>; rel="https://api.w.org/"
Upgrade: h2,h2c
Connection: Upgrade
Vary: Accept-Encoding,User-Agent
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

The XML send does try to send but gets denied due to the dateTime error. And thats where it gets weird, since i've checked the server time and there is no issue there. The server time is the correct 12:40:...

So my HTTP header is 2 hours behind the servertime.

So my question is:

Is there any solution to this or is there someone else who has the same problem?

I hope the description of my issue is clear and if it isn't please let me know and i'll update the question.

As always, Thanks in advance!

So due to the comments in the question about the timezone etc. I've found the problem and solved it.

When using the prestashop webservice an configuration file is created on the original prestashop application. In the configuration the timezone wasn't set coreect.

All credits to @Quentin for the solution.

Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM