Skip to content

Error on parsing binary (png) replies #10

@bigmonkeyboy

Description

@bigmonkeyboy

Hi if is use cgi to call a mapserver... mapserv
It should return the tiles as png files... - but this seems to cause the parser to error out..
Here is the "line" returned (well just the first part)

Content-type: image/png

�PNG ...
LINE �
IHDR�����h��PLTEu�[�77>8(�ؘ�Ȉɼf�������֪w�G���~��G��!u�����u���V���[�����ۏ�噙�kk�tt�}}҆��{Z����y��G��P��Y��b��k��t��}��`��rȽ{�Ƅ����ևe����������|�B�:=K�>��tRNS@��f IDATx��]i�#����p�����

and the error from.... /node_modules/cgi/node_modules/header-stack/parser.js:110:33)
ParseError: Malformed header line, no delimiter (:) found: "����W������
�Vq�pn����"

For completeness - here is the start of the "chunk" -
<Buffer 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 69 6d 61 67 65 2f 70 6e 67 0a 0a 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 01 00 00 00 01 00 08 03 ...>
so you can see the 0a 0a end of header...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions