PrestaShop-webservice-lib icon indicating copy to clipboard operation
PrestaShop-webservice-lib copied to clipboard

PSWS-Version response header case sensitivity

Open rsobap opened this issue 1 year ago • 0 comments

It seems that some web servers return this header in lowercase. This causes the version compatibility check to be ignored because the library expects the header to be exactly 'PSWS-Version': https://github.com/PrestaShop/PrestaShop-webservice-lib/blob/94feb5f547b4a33cd9c759edfa581f30fa42803b/PSWebServiceLibrary.php#L214

Example response:

HTTP/1.1 200 OK
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
access-time: 1701712674
x-powered-by: PrestaShop Webservice
psws-version: 8.1.2
content-type: text/xml;charset=utf-8
execution-time: 0.005
...
server: LiteSpeed
vary: User-Agent

rsobap avatar Dec 04 '23 18:12 rsobap