https://bugs.documentfoundation.org/show_bug.cgi?id=172907
Bug ID: 172907
Summary: WEBSERVICE function makes triple requests, leads to
rate limiting
Product: LibreOffice
Version: 27.2.0.0 alpha0+ master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Created attachment 207871
--> https://bugs.documentfoundation.org/attachment.cgi?id=207871&action=edit
Triple requests from WEBSERVICE
Before making the GET request, the WEBSERVICE function also makes an OPTIONS
and a HEAD request. This causes APIs that enforce rate limits of 1 request /
second to return a rate limit error. There is no workaround.
Repro steps:
1. Save the code below as "server.js"
2. Run it with `node server.js`
3. From a Calc cell, call `=WEBSERVICE("http://localhost:3000")`
4. Notice the three requests being logged
```js
const http = require('http');
http.createServer((req, res) => {
console.log(`${new Date().toISOString()} - ${req.method} ${req.url}`);
res.end('Logged!');
}).listen(3000, () => {
console.log('Server running on http://localhost:3000');
});
```
What would be the downsides of removing the extra OPTIONS and HEAD requests?
--
You are receiving this mail because:
You are the assignee for the bug.