Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(141)

Issue 2192046: No redirect for Ajax and Options requests

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 3 months ago by fmeschbe
Modified:
15 years, 3 months ago
Reviewers:
justinedelson
Base URL:
https://svn.apache.org/repos/asf/sling/trunk/
Visibility:
Public.

Description

Proposed patch to fix: https://issues.apache.org/jira/browse/SLING-1745 https://issues.apache.org/jira/browse/SLING-1400

Patch Set 1 #

Patch Set 2 : Updated patch introducing helper methods for WebAV and Ajax detection #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -8 lines) Patch
bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/HttpBasicAuthenticationHandler.java View 1 chunk +1 line, -1 line 0 comments Download
bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java View 1 4 chunks +183 lines, -7 lines 1 comment Download

Messages

Total messages: 3
fmeschbe
15 years, 3 months ago (2010-09-20 14:12:12 UTC) #1
fmeschbe
Updated patch introducing helper methods for WebAV and Ajax detection
15 years, 3 months ago (2010-09-21 08:06:15 UTC) #2
justinedelson
15 years, 3 months ago (2010-09-22 15:51:05 UTC) #3
http://codereview.appspot.com/2192046/diff/4001/bundles/auth/core/src/main/ja...
File
bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
(right):

http://codereview.appspot.com/2192046/diff/4001/bundles/auth/core/src/main/ja...
bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java:1033:
|| METHOD_PROPFIND.equals(method);
this isn't quite what I meant. I was trying to suggest that we ignore the method
entirely and so this method should really be

return request.getHeader(HEADER_ACCEPTS) == null &&
(!request.getHeader(HEADER_ACCEPTS).contains("text/html"))

the reason for this is that a non-browser client should always get a 401
response and AFAIK, the Accepts header is the best way to detect if a request is
coming from a browser or not
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b