Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeHead in send-pbf causes errors #922

Closed
Cartobin opened this issue Feb 20, 2024 · 2 comments
Closed

writeHead in send-pbf causes errors #922

Cartobin opened this issue Feb 20, 2024 · 2 comments

Comments

@Cartobin
Copy link

When using koop as express middleware the current

res.writeHead(200, [
    ['content-type', 'application/x-protobuf'],
    ['content-length', buffer.length],
    ['content-disposition', `inline;filename=${FILENAME}`],
  ]);

on line 20 of packages/featureserver/src/response-handlers/helpers/send-pbf/index.js causes a header error. Locally, I tested a fix by using

res.set('content-type', 'application/x-protobuf'),
res.set('content-length', buffer.length),
res.set('content-disposition', `inline;filename=${FILENAME}`)
res.status(200)

in its place and it returned a pbf.

@rgwozdz
Copy link
Member

rgwozdz commented Mar 15, 2024

Hello @Cartobin, thanks for posting this. Not doubting you, but we haven't seen it in our demo's or tests, so I am curious about the specific error. Can you post it if you still have it?

@rgwozdz
Copy link
Member

rgwozdz commented Mar 18, 2024

@Cartobin, see #950

@rgwozdz rgwozdz closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants