Bug Report T919942
Visible to All Users

It's impossible to record a test for a web application that sends responses with large HTTP headers

created 5 years ago (modified 5 years ago)

Hi

I have a web app that works fine in IIS. It does send requests with large headers. The registry was modified to allow IIS to accept requests with large headers up to 50k. This is a requirement.

When testing the app in Test Cafe, I am getting 'HTTP 431 Request Header Fields Too Large' responses. I think Test Cafe uses Node.
It seems Node also has a request header size limit . It can be increased with max-http-header-size parameter.

Since Test Cafe Studio launches Node, is there a way for Test Cafe to launch Node where it can set the max-http-header-size either from the command line or read a setting for it from somewhere? Something like what has been mentioned here with a package.json file. The size needs to increase to 50k as well.

Or any workaround. Without increasing the request header size, the app won't work properly.

Answers approved by DevExpress Support

created 5 years ago

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. To apply this solution before official release, request a hotfix by clicking the appropriate version link.

Note: Hotfixes may be unavailable for betas/updates set for release within a week.

    created 5 years ago

    Hello,

    At present, TestCafe Studio doesn't allow you to specify additional node.js arguments for test execution.
    However, if you run your tests from the command line, you can use the workaround described here: https://github.com/DevExpress/testcafe/issues/3438#issuecomment-471971400

      Show previous comments (1)

        I have used several old versions of Node all the way down to version 4.9.1 and they all show the same errors in the browser's console. 431 Request header Fields too large. The error is from hammerhead.js. I attached where the error is occurring.

        When I checked one of the requests to IIS using Fiddler, the same request which gives an error when using Studio, the request was about 15KB where the bearer token was about 13KB. The response was about 5KB.

        I think the bearer field is too big for Node which causes the 431 error.

        DO DO
        Dmitry O. (DevExpress) 5 years ago

          TestCafe Studio v1.3.1 is based on ElectronJS v8.3.1. This framework uses Node.js v12.13.1. You can find this information in the Help -> About window.

          TestCafe Studio cannot launch test recording with custom node.js arguments. However, we've decided to research the possibility of increasing the header size limit for test recording and running, Once we have any news, we'll update this thread.

          I suggest you try TestCafe Studio v1.2.1. It works with Node.js v8.9.3 and shouldn't have this limitation.

            Test Cafe Studio comes with its own Node? So my attempts to try different Node versions were useless. This explains why I kept getting the same 431 error with old versions.

            I tried version 1.2.1 and I don't get anymore the errors. Thanks.

            Yes please add a feature where we can set the header size somewhere. Node's default 8K size limit can be too limiting.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.