Using zlib to POST to Google cloud2019 Community Moderator ElectionError: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR'Using zlib deflateBound() dynamicallyPython: Inflate and Deflate implementationsQt quncompress gzip dataZlib decompression throws header error - RubyIncorrect header check errorHow are zlib, gzip and zip related? What do they have in common and how are they different?c++ zlib: incorrect header checkPython zlib gzip decompression fails with string compressed on client side via pakoUncompress String with nodejs that was compressed using a C# snippetError: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR'Zlib: Node.js can't extract compressed data from python

Latest web browser compatible with Windows 98

Am I not good enough for you?

Should QA ask requirements to developers?

Who deserves to be first and second author? PhD student who collected data, research associate who wrote the paper or supervisor?

Is it true that real estate prices mainly go up?

Why would a jet engine that runs at temps excess of 2000°C burn when it crashes?

How do I locate a classical quotation?

How do I express some one as a black person?

Is Gradient Descent central to every optimizer?

How much attack damage does the AC boost from a shield prevent on average?

The bar has been raised

Time travel short story where dinosaur doesn't taste like chicken

In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?

Replacing Windows 7 security updates with anti-virus?

Virginia employer terminated employee and wants signing bonus returned

Why the color red for the Republican Party

How to pass a string to a command that expects a file?

Why don't MCU characters ever seem to have language issues?

Examples of a statistic that is not independent of sample's distribution?

Do f-stop and exposure time perfectly cancel?

Should I tell my boss the work he did was worthless

Space in array system equations

Do I really need to have a scientific explanation for my premise?

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?



Using zlib to POST to Google cloud



2019 Community Moderator ElectionError: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR'Using zlib deflateBound() dynamicallyPython: Inflate and Deflate implementationsQt quncompress gzip dataZlib decompression throws header error - RubyIncorrect header check errorHow are zlib, gzip and zip related? What do they have in common and how are they different?c++ zlib: incorrect header checkPython zlib gzip decompression fails with string compressed on client side via pakoUncompress String with nodejs that was compressed using a C# snippetError: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR'Zlib: Node.js can't extract compressed data from python










0















I found a similar question (Error: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR') but that has not been answered. I have not seen anything on Google forums either.



background:



  • I ported zlib into my project

  • I do not have a file system, so compress() is fed a report constructed as a JSON string.

  • I know the JSON string is acceptable because if I POST it without compression everything works.

  • I am using zlib in its simplest form (see Using zlib deflateBound() dynamically)

  • If I do a self check (i.e. instead of sending the compressed message to the server, I feed it into deflate then compare the output to the original) everything look fine.

Symptoms



  • The response I get to the POST is "status":400,"error":"incorrect header check"


  • The server team is telling me that the error is thrown by gunzip so I am assuming the problem is with the gzip header, not the HTTP header.



    message: " Error: incorrect header check
    at Gunzip.zlibOnError (zlib.js:153:15)
    errno: -3,
    code: 'Z_DATA_ERROR',
    expose: true,
    statusCode: 400,
    status: 400 "



Is there some magic setting in either end that is needed for this? I have not found a Google document that says "use these settings for compression (not that zlib has a lot of settings)



Edit: everything I see mentions compressing files. In fact the few samples I saw all show a filename if you look in the gzip header. In my case, there is no file or filename, compress works on a string in memory and we send the resulting binary array directly. I am nto sure if this makes a difference.










share|improve this question




























    0















    I found a similar question (Error: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR') but that has not been answered. I have not seen anything on Google forums either.



    background:



    • I ported zlib into my project

    • I do not have a file system, so compress() is fed a report constructed as a JSON string.

    • I know the JSON string is acceptable because if I POST it without compression everything works.

    • I am using zlib in its simplest form (see Using zlib deflateBound() dynamically)

    • If I do a self check (i.e. instead of sending the compressed message to the server, I feed it into deflate then compare the output to the original) everything look fine.

    Symptoms



    • The response I get to the POST is "status":400,"error":"incorrect header check"


    • The server team is telling me that the error is thrown by gunzip so I am assuming the problem is with the gzip header, not the HTTP header.



      message: " Error: incorrect header check
      at Gunzip.zlibOnError (zlib.js:153:15)
      errno: -3,
      code: 'Z_DATA_ERROR',
      expose: true,
      statusCode: 400,
      status: 400 "



    Is there some magic setting in either end that is needed for this? I have not found a Google document that says "use these settings for compression (not that zlib has a lot of settings)



    Edit: everything I see mentions compressing files. In fact the few samples I saw all show a filename if you look in the gzip header. In my case, there is no file or filename, compress works on a string in memory and we send the resulting binary array directly. I am nto sure if this makes a difference.










    share|improve this question


























      0












      0








      0








      I found a similar question (Error: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR') but that has not been answered. I have not seen anything on Google forums either.



      background:



      • I ported zlib into my project

      • I do not have a file system, so compress() is fed a report constructed as a JSON string.

      • I know the JSON string is acceptable because if I POST it without compression everything works.

      • I am using zlib in its simplest form (see Using zlib deflateBound() dynamically)

      • If I do a self check (i.e. instead of sending the compressed message to the server, I feed it into deflate then compare the output to the original) everything look fine.

      Symptoms



      • The response I get to the POST is "status":400,"error":"incorrect header check"


      • The server team is telling me that the error is thrown by gunzip so I am assuming the problem is with the gzip header, not the HTTP header.



        message: " Error: incorrect header check
        at Gunzip.zlibOnError (zlib.js:153:15)
        errno: -3,
        code: 'Z_DATA_ERROR',
        expose: true,
        statusCode: 400,
        status: 400 "



      Is there some magic setting in either end that is needed for this? I have not found a Google document that says "use these settings for compression (not that zlib has a lot of settings)



      Edit: everything I see mentions compressing files. In fact the few samples I saw all show a filename if you look in the gzip header. In my case, there is no file or filename, compress works on a string in memory and we send the resulting binary array directly. I am nto sure if this makes a difference.










      share|improve this question
















      I found a similar question (Error: incorrect header check at Zlib._handle.onerror (zlib.js:355:17) errno: -3, code: 'Z_DATA_ERROR') but that has not been answered. I have not seen anything on Google forums either.



      background:



      • I ported zlib into my project

      • I do not have a file system, so compress() is fed a report constructed as a JSON string.

      • I know the JSON string is acceptable because if I POST it without compression everything works.

      • I am using zlib in its simplest form (see Using zlib deflateBound() dynamically)

      • If I do a self check (i.e. instead of sending the compressed message to the server, I feed it into deflate then compare the output to the original) everything look fine.

      Symptoms



      • The response I get to the POST is "status":400,"error":"incorrect header check"


      • The server team is telling me that the error is thrown by gunzip so I am assuming the problem is with the gzip header, not the HTTP header.



        message: " Error: incorrect header check
        at Gunzip.zlibOnError (zlib.js:153:15)
        errno: -3,
        code: 'Z_DATA_ERROR',
        expose: true,
        statusCode: 400,
        status: 400 "



      Is there some magic setting in either end that is needed for this? I have not found a Google document that says "use these settings for compression (not that zlib has a lot of settings)



      Edit: everything I see mentions compressing files. In fact the few samples I saw all show a filename if you look in the gzip header. In my case, there is no file or filename, compress works on a string in memory and we send the resulting binary array directly. I am nto sure if this makes a difference.







      google-cloud-platform zlib






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 6 at 16:35







      ilnadi

















      asked Mar 6 at 16:25









      ilnadiilnadi

      113




      113






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I found the problem: "Content-Encoding" was set to "gzip" but since I am sending a zlibstream rather than a .gz file, it should have been set to "deflate".



          See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for details.






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55027831%2fusing-zlib-to-post-to-google-cloud%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I found the problem: "Content-Encoding" was set to "gzip" but since I am sending a zlibstream rather than a .gz file, it should have been set to "deflate".



            See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for details.






            share|improve this answer



























              1














              I found the problem: "Content-Encoding" was set to "gzip" but since I am sending a zlibstream rather than a .gz file, it should have been set to "deflate".



              See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for details.






              share|improve this answer

























                1












                1








                1







                I found the problem: "Content-Encoding" was set to "gzip" but since I am sending a zlibstream rather than a .gz file, it should have been set to "deflate".



                See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for details.






                share|improve this answer













                I found the problem: "Content-Encoding" was set to "gzip" but since I am sending a zlibstream rather than a .gz file, it should have been set to "deflate".



                See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for details.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 6 at 20:41









                ilnadiilnadi

                113




                113





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55027831%2fusing-zlib-to-post-to-google-cloud%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    1928 у кіно

                    Захаров Федір Захарович

                    Ель Греко