Page 1 of 1

fetching biblio in batch for ~70 - 100 patents at once doesn't return proper headers

Posted: Sun Jun 03, 2018 1:33 am
by jalipert
Hello,

The biblio API allows input for up to 100 patents in batch during a POST request. However, I've noticed that if I run a query of ~70 - 100 patents at once (easily reproducible for me when passing in 100 patents), the headers are missing info such as the Quota usage. In this case, the response headers for me look like this:

Code: Select all

Array
(
    [http_code] => HTTP/1.1 100 Continue
)
In comparison, when querying for batches of 60 or less (sometimes works for slightly more), the headers look like this:

Code: Select all

Array
(
    [http_code] => HTTP/1.1 200 OK
    [Access-Control-Allow-Headers] => Authorization
    [Access-Control-Allow-Methods] => POST
    [Access-Control-Allow-Origin] => *
    [Content-Type] => application/xml;charset=utf-8
    [Date] => Sun, 03 Jun 2018 00:22:48 GMT
    [Server] => Apache
    [Vary] => Accept
    [X-API] => ops-v3.2
    [X-Elapsed-Time] => 19
    [X-EPO-Client-IP] => redacted.ip.address
    [X-EPO-Forwarded] => [redacted.ip.address]
    [X-IndividualQuotaPerHour-Used] => 438251486
    [X-RegisteredQuotaPerWeek-Used] => 875416248
    [X-Throttling-Control] => idle (images=green:200, inpadoc=green:60, other=green:1000, retrieval=green:200, search=green:30)
    [Content-Length] => 22383
    [Connection] => keep-alive
)
Any ideas? Is this due to some client setting I am using, or is it possibly an issue on the server?

Thanks!
Joe

Re: fetching biblio in batch for ~70 - 100 patents at once doesn't return proper headers

Posted: Mon Jun 04, 2018 10:22 am
by EPO / OPS Support
Hi,

Does it happen if you make the same query using GET (OPS Published service with Biblio using GET works for up to 100 numbers too)? Is it only one specific batch or any batch with over 70 numbers?

I would like to test your query so can I ask you to send it to me via email (patentdata(at)epo.org)?

Regards,
Vesna for OPS support

Re: fetching biblio in batch for ~70 - 100 patents at once doesn't return proper headers

Posted: Tue Jun 05, 2018 6:45 pm
by jalipert
I wasn't able to reproduce in postman, and after further investigation it looks like an issue with PHP clients when the POST size is above 1024 bytes (which I suppose happens once the number of patents in a request gets above 70 or so).

I was able to fix my issue and get the expected response headers when adding the additional request header "Expect:" as described in this GitHub discussion:

https://gist.github.com/perusio/1724301