You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that further documentation is needed for how to use Nocilla with redirects, as it's not clear that you must include the Location header in the stub itself.
The text was updated successfully, but these errors were encountered:
Just so we're on the same page, it's important to note that HTTP requires that you include a Location header when responding with a 3XX code (https://tools.ietf.org/html/rfc2616#section-10.3).
Since this is all very standard stuff, I wouldn't really describe it as documentation needed for using Nocilla with redirects; I'd just say that it's generally what you need to do when responding with a redirect.
Now, the crash that you're seeing here is happening because Nocilla isn't doing appropriate checks for nil when it retrieves the Location header. In my opinion, this is just a bug that happens to be fatal if you don't stub a well-formed redirect. I've documented this along with a few other redirect quirks in issue #124.
I'm getting a crash on line 54 of
LSHTTPStubURLProtocol
:[redirectRequest setAllHTTPHeaderFields:[NSHTTPCookie requestHeaderFieldsWithCookies:[cookieStorage cookiesForURL:newURL]]];
Here is the stack trace:
My testing code is as follows:
It seems that further documentation is needed for how to use Nocilla with redirects, as it's not clear that you must include the
Location
header in the stub itself.The text was updated successfully, but these errors were encountered: