Error -35196: HTTP Status-Code=431 (Request Header Fields Too Large)

Hello Team,

We have recorded an application using Web HTTP/HTML protocol, while replaying it getting an error "Error -35196: HTTP Status-Code=431 (Request Header Fields Too Large)".

Looking into the details in Snapshot we see that there are many entries in Cookies, not sure if it's the root cause for this issue.

Can you let me know how to resolve it?

Thanks,

Raghavendra.

  • 0  

    Hi ,

    It is an error send back by the server. During recording it did not happen, so something during replay is causing this. This error is discussed here.

    1. Did you record with cookies enabled? (I.e. do you have web_set_cookie()) calls in your script?). Normally you would not need to do that because the LR replay engine handles cookies automatically. Only when e.g. client JS code sets up cookies, it might be an issue.

    When you have many of those web_set_cookie() calls, you might just disable them with a define. Add to your globals.h file near bottom the line:

    #define web_set_cookie(X)

    This will turn all those calls in nothing. Now try to run your script again.

    2. Check out the cookie setting in Run Time Settings: Look at 'Browser Emulation' and play with caching.

    3. Compare the header sizes and the structure during your replay and compare them with what you see in your browser; press F12 to open Dev Tools, go to the network tab and perform the failing stap in your browser and note all the headers.

    Success, Erik (And of cause a happy performing new year!)

    How to ask questions

    Reward contributions via likes or 'verified answers'

  • 0 in reply to   

    Hello Erik,

    Thanks & Happy New Year to you too.

    1) I don't have web_set_cookie() calls in the script.
     Is there an option to remove cookie which contains text starting with  ouctbstfbc? Like a regular expression?


    Thanks in advance,
    Raghavendra.

  • 0   in reply to 

    Hi ,

    The official name is web_add_cookie(). There are a number of functions to work with cookies. Checkout the help; discover and learn.

    How to ask questions

    Reward contributions via likes or 'verified answers'