Code Monkey home page Code Monkey logo

Comments (6)

BenFradet avatar BenFradet commented on June 12, 2024

mmh weird, is the leading + the issue?

from github4s.

drwlrsn avatar drwlrsn commented on June 12, 2024

The leading + seems to be just fine. The following request works fine:

https://api.github.com/search/issues?q=+repo:47degrees/github4s+type:pr+label:enhancement+state:open

from github4s.

drwlrsn avatar drwlrsn commented on June 12, 2024

Ah okay I think I have some more info. IssuesInterpreter assembles a query here:

params = Map("q" -> s"${encode(query, "utf-8")}+${searchParams.map(_.value).mkString("+")}")

At this point the value of the q has a string value of: +repo:47degrees/github4s+type:pr+state:open+label:enhancement

I setup mitmproxy to check what the actual request looks like, and the request it intercepts looks like this:

GET https://140.82.113.6/search/issues?q=%2Brepo%3A47degrees/github4s%2Btype%3Apr%2Bstate%3Aopen%2Blabel%3Aenhancement

It seems like percent encoding the + and : chars is breaking the request

from github4s.

BenFradet avatar BenFradet commented on June 12, 2024

good catch! 👍

from github4s.

sloshy avatar sloshy commented on June 12, 2024

I believe I've found the source of the issue. Whether or not it's a bug proper in http4s remains to be seen, but it appears that http4s uses different encoder settings for query parameters VS the main URL. I've submitted this to them as the above issue (the second one, the first was a similar issue I thought was related but was a bit different), so hopefully we will hear back soon!

from github4s.

sloshy avatar sloshy commented on June 12, 2024

Fix is posted above ^

from github4s.

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.