Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud Endpoints generating HTTP 404 for special characters passed as named parameter

I've created very simple endpoint with one HTTP GET method. I'm passing one string as ApiMethod named parameter:

@Api (name = "sample_endpoint")
public class SampleEndpoint
{
    public Entity get(@Named("parameter") String parameter)
    {
        return new Entity(parameter);
    }

    public class Entity
    {
        public String parameter = "Validated ok.";
        public Entity(String parameter) { this.parameter = parameter; }
        public String getParameter() { return parameter; }
    }
}

When I call URL with parameter containing letters and numbers and some special chars, like -., it works:

GET http://localhost:8888/_ah/api/sample_endpoint/v1/entity/passedparam

200 OK
{
 "parameter": "passedparam"
}

But when I insert certain special characters into parameter, like :#/, I'm getting HTTP 404. Parameter is URL encoded, in example I'm using value passed:param

GET http://localhost:8888/_ah/api/sample_endpoint/v1/entity/passed%3Aparam

404 Not Found
<html><head><title>Error 404</title></head>
<body><h2>Error 404</h2></body>
</html>

Is it bug or feature? Or maybe I'm doing it wrong?

like image 379
jskierbi Avatar asked Jan 01 '26 04:01

jskierbi


1 Answers

This has been solved as of App Engine SDK 1.8.6

like image 73
willlma Avatar answered Jan 02 '26 17:01

willlma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!