Coder Social home page Coder Social logo

Comments (5)

jchristn avatar jchristn commented on July 16, 2024

Hi @rangsutu88 thanks for your note. I will look into it ASAP hopefully today.

from watsonwebserver.

jchristn avatar jchristn commented on July 16, 2024

Hi @rangsutu88 - these are being URL decoded. The / character is a reserved character which has to be encoded. Please refer to p2.2 of the RFC: https://tools.ietf.org/html/rfc3986#page-12 (there's a healthy discussion about this on stackoverflow here: https://stackoverflow.com/questions/1455578/characters-allowed-in-get-parameter)

These are being processed and decoded by WebUtility.UrlDecode (see https://docs.microsoft.com/en-us/dotnet/api/system.net.webutility.urldecode?view=netcore-3.1) to accomplish this.

Cheers, Joel

from watsonwebserver.

rangsutu88 avatar rangsutu88 commented on July 16, 2024

hi @jchristn .
I think this issue come from WatsonWebserver Request module. at below code
at the line 243 in HttpRequest.cs. Sorry if i'm wrong

region Process-Raw-URL-and-Populate-Raw-URL-Elements

                while (RawUrlWithoutQuery.Contains("//"))
                {
                    RawUrlWithoutQuery = RawUrlWithoutQuery.Replace("//", "/");
                }

from watsonwebserver.

jchristn avatar jchristn commented on July 16, 2024

Hi @rangsutu88 that is being done over the raw URL i.e. /hello, not the query string entries i.e. ?key=test//test. The query string is handled by the decode function:

tempKey = WebUtility.UrlDecode(tempKey);
if (!String.IsNullOrEmpty(tempVal)) tempVal = WebUtility.UrlDecode(tempVal);

Please see lines 326-327, 358-360, 375-376, and 384-386 in HttpRequest.cs.

Which reminds me I have some refactoring to do in that particular method. Thanks!

from watsonwebserver.

rangsutu88 avatar rangsutu88 commented on July 16, 2024

hi @jchristn ,
Thank your for your explanation.

from watsonwebserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.