Giter Site home page Giter Site logo

Comments (3)

stewartmckee avatar stewartmckee commented on June 21, 2024

Thanks, hopefully they've fixed the ruby's uri implementation, but it was badly broken some years ago, since then i've used addressable as its been the most reliable, but would be good to add some options or even switch to ruby's uri if it is now true to the rfc.

from cobweb.

gh2k avatar gh2k commented on June 21, 2024

Do you know a good way to test the URI implementation in 2.1 against the RFC?

from cobweb.

sporkmonger avatar sporkmonger commented on June 21, 2024

Just closed sporkmonger/addressable#160 as "won't fix", but wanted to comment here because I suspect cobweb is actually misusing Addressable, given that this issue came up.

The uri.normalize method's output should not generally be used directly to query a web server. Instead, you want to use it as more of a lookup key for caches or previously crawled URLs, etc. So you'd use uri to query your web server and uri.normalize to record the output the web server gives you back. But you'd never want to make a request to the web server with the output of uri.normalize because it's an intentionally lossy operation that's primarily meant for lookups and equality testing (where both sides of the URI equality being tested get normalized and then compared). Probably 95+% of the time it'll work fine to do it the wrong way, but then every once in awhile it'll bite you.

Sorry about getting to this so late after the issue was opened.

from cobweb.

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.