Title: Serving HEAD requests from duckdb (CLI/WASM) read_csv() and read_json() calls · Issue #47 · Query-farm/httpserver · GitHub
Open Graph Title: Serving HEAD requests from duckdb (CLI/WASM) read_csv() and read_json() calls · Issue #47 · Query-farm/httpserver
X Title: Serving HEAD requests from duckdb (CLI/WASM) read_csv() and read_json() calls · Issue #47 · Query-farm/httpserver
Description: When using duckdb CLI or WASM as a client to an host with instance running the httpserver extension and reading CSV or JSON from a URL like "https://some.httpserver.instance/api/?add_http_cors_header=1&default_format=CSV&q=select 42" i...
Open Graph Description: When using duckdb CLI or WASM as a client to an host with instance running the httpserver extension and reading CSV or JSON from a URL like "https://some.httpserver.instance/api/?add_http_cors_head...
X Description: When using duckdb CLI or WASM as a client to an host with instance running the httpserver extension and reading CSV or JSON from a URL like "https://some.httpserver.instance/api/?add_http_cors...
Opengraph URL: https://github.com/Query-farm/httpserver/issues/47
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Serving HEAD requests from duckdb (CLI/WASM) read_csv() and read_json() calls","articleBody":"When using duckdb CLI or WASM as a client to an host with instance running the httpserver extension and reading CSV or JSON from a URL like \"https://some.httpserver.instance/api/?add_http_cors_header=1\u0026default_format=CSV\u0026q=select%2042\" it is possible to add basic auth to the request by doing\n\n```sql\n\n-- set up basic auth\ncreate secret http_auth_header(type HTTP, EXTRA_HTTP_HEADERS MAP {'Authorization': 'Basic \u003cbase64enc_of_user:pass\u003e'});\n\n-- retrieve data\nfrom read_csv('https://some.httpserver.instance/api/?add_http_cors_header=1\u0026default_format=CSV\u0026q=select 42');\n\n-- clean up\ndrop secret http_auth_header;\n\n```\n\nFor the duckdb CLI there is a setting `SET force_download = true` that can be used to stop HEAD requests to be sent (a setting which doesn't kick in when using duckdb WASM (yet), I think?) which avoids read_csv and read_json causing HEAD requests, since some servers just don't serve that verb but you can GET csv and/or json. \n\nI believe httpserver is one of those servers after a cursory glance at the code? I cannot find any mention of HEAD there and there or with regards to the CORS headers where GET, POST, OPTIONS and PUT are mentioned.\n\nWould it be possible to add support to httpserver for just the kind of HEAD requests that duckdb (CLI/WASM) makes when used for reading csv or json from a url served by httpserver?\n\nThere might even be fancy features such as serving range requests etc for (large, streaming) CSV content which read_csv() already makes use of that potentially could be supported by httpserver when it serves this content type?\n\n\n","author":{"url":"https://github.com/mskyttner","@type":"Person","name":"mskyttner"},"datePublished":"2025-10-23T09:40:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/47/httpserver/issues/47"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7013dd0e-fcd0-a9c3-3c91-84c929dfe079 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBC4:8C836:4D13C:67847:6981EB7E |
| html-safe-nonce | 64a42e27a8feb4f39545cf685d97d7be5a1c0c459a133d137c7c3c311d70ca44 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkM0OjhDODM2OjREMTNDOjY3ODQ3OjY5ODFFQjdFIiwidmlzaXRvcl9pZCI6IjgwNDEzODU5NTc3NTAwNzQyMzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e89007b521b6da83a3566db3fcfc8dfb2629004d9d01faf8551f85b5c2507ba1 |
| hovercard-subject-tag | issue:3543920823 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Query-farm/httpserver/47/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ac8d5e651d326d3708f545be839eebabb1dc05cd3e178fb287c18fcd0bec466/Query-farm/httpserver/issues/47 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ac8d5e651d326d3708f545be839eebabb1dc05cd3e178fb287c18fcd0bec466/Query-farm/httpserver/issues/47 |
| og:image:alt | When using duckdb CLI or WASM as a client to an host with instance running the httpserver extension and reading CSV or JSON from a URL like "https://some.httpserver.instance/api/?add_http_cors_head... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mskyttner |
| hostname | github.com |
| expected-hostname | github.com |
| None | ebfdf8d3e0fd17b103f41cc6696d84938694ebebdfecaf11fe00dbe4a9785801 |
| turbo-cache-control | no-preview |
| go-import | github.com/Query-farm/httpserver git https://github.com/Query-farm/httpserver.git |
| octolytics-dimension-user_id | 183420031 |
| octolytics-dimension-user_login | Query-farm |
| octolytics-dimension-repository_id | 869750358 |
| octolytics-dimension-repository_nwo | Query-farm/httpserver |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 869750358 |
| octolytics-dimension-repository_network_root_nwo | Query-farm/httpserver |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac4541b58a15c144d6ed4fc868b9ea4bb99bb4b6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width