Commit graph

10 commits

Author SHA1 Message Date
Dan Stillman
c2b6a9cc12 fx140: Fix NetUtil import in server tests 2025-07-30 22:31:03 -04:00
Abe Jellinek
67d2e1cead fx140: Asyncify/ESMify tests
They seem to be succeeding when run individually, but failing when
run as a whole. Not sure why yet.
2025-07-30 22:30:53 -04:00
Adomas Venčkauskas
11014be449 Server: Add support for UTF in server headers (RFC2047) 2025-07-24 13:26:23 +03:00
Adomas Venčkauskas
5e18337cc6 Simple attachment saving via Connector (instead of Zotero) (#5148) 2025-04-22 09:47:58 -04:00
Adomas Venčkauskas
d781151b9a Make server.js use mozilla httpd and support application/octet-stream (#5148) 2025-04-22 09:47:58 -04:00
Adomas Venčkauskas
67b5a0bb19 Use the bundled mozilla httpd (#5148) 2025-04-22 09:47:58 -04:00
Abe Jellinek
d9550bb5df Server: Expose actual bound port (#4903)
And:
- Use a different port for tests so server tests don't break when Zotero
  is already running
- Remove no-op httpServer.enabled pref updates in tests
   - It's already enabled, no test disables it, and any test that did
     would clean up after itself
   - Updating that pref has no effect without a separate call to
     Zotero.Server.init()
- Remove unused arg to Zotero.Server.init()
2024-12-14 01:16:03 -05:00
Fletcher Hazlehurst
bb0ddbd872 Fix server not handling empty body in multi-part request
An empty body is still valid. Was causing an issue for empty favicons.

https://forums.zotero.org/discussion/85600/bug-report-no-snapshot-in-zotero-beta
2020-10-12 15:06:11 -06:00
Fletcher Hazlehurst
0fba08b3c9 Use SingleFile to create snapshots of web pages 2020-09-23 09:37:09 -07:00
Dan Stillman
b5bc18c7ed Add new init(options) signature for server endpoints
An endpoint can now take a single object containing 'method', 'pathname',
'query', 'headers', and 'data' and return an integer, an array containing
[statusCode, contentType, body], or a promise for either. This allows the
handlers to use the HTTP method and headers and removes the need for callbacks
when some handlers already use coroutine().

If init() returns a promise, it now has to use the new single-parameter
signature (because the check is done with Function.length, and combining
promises and callbacks doesn't make sense anyway).
2016-12-05 02:55:32 -05:00