You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "rvesse (via GitHub)" <gi...@apache.org> on 2023/01/25 09:44:18 UTC

[GitHub] [jena] rvesse commented on a diff in pull request #1729: GH-1723: Allow for overriding the default dispatch choice

rvesse commented on code in PR #1729:
URL: https://github.com/apache/jena/pull/1729#discussion_r1086410954


##########
jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Dispatcher.java:
##########
@@ -395,27 +455,13 @@ private static void applyAuthentication(String user, DataService dataService, En
      * Assumes, and does not check, that the action is a GSP action.
      */
     private static Operation gspOperation(HttpAction action, HttpServletRequest request) {
-        // Check enabled.
-        if ( isReadMethod(request) )
-            return GSP_R;
-        else
-            return GSP_RW;
+        return isReadMethod(request) ? GSP_R : GSP_RW;
     }
 
     /**
-     * Determine the {@link Operation} for a Quads operation. (GSP, except on the
-     * whole dataset).
-     * <p>
-     * Assumes, and does not check, that the action is a Quads action.
+     * Return whether request method is a "read" (GET or HEAD) or "write", modifying
+     * (POST, PUT, DELETE, PATCH)

Review Comment:
   `OPTIONS` being rejected is most likely to be a problem for browser based UIs since it's used as a pre-flight request by browsers prior to sending the real request



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org