411 error returned when calling _api/contextinfo

%3CLINGO-SUB%20id%3D%22lingo-sub-2610293%22%20slang%3D%22en-US%22%3E411%20error%20returned%20when%20calling%20_api%2Fcontextinfo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2610293%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20form%20built%20using%20SPFX%20solution.%20On%20save%20or%20submit%20action%20sharepoint%20rest%20api%20is%20invoked.%3C%2FP%3E%3CP%3EWhen%20he%20clicks%20on%20save%20or%20submit%20the%20form%20gets%20stuck%20and%20does%20not%20perform%20any%20action.%20On%20the%20browser%20console%20log%20we%20could%20see%20411%20error%20returned%20(content%20length%20required)%20on%20_api%2FContextInfo%20request.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20tried%20clearing%20browser%20cache%20and%20clearing%20cookies.%20All%20these%20resolution%20failed.%20Any%20suggestion%20on%20how%20to%20resolve%20this%20issue%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

 

We have a form built using SPFX solution. On save or submit action sharepoint rest api is invoked.

When user clicks on save or submit the form get stuck and does not perform any action. On the browser console log we could see 411 error returned (content length required) on the rest api _api/ContextInfo request(screenshot attached).

 

We tried in chrome, edge and mozilla browser all shows the same result. In some blogs, there were solutions to add content-length:0 in the header. But this value is been automatically been added by all the major browsers if there is no content in post request.

 

We tried clearing browser cache and clearing cookies. All these resolution failed. Any suggestion on how to resolve this issue ?

0 Replies