Skip to content

Conversation

@MySixSenses
Copy link

Remove unnecessary user-agent descriptor.

Remove unnecessary user-agent descriptor.
@IshaanRao
Copy link
Owner

IshaanRao commented May 24, 2021

The user agent descriptor was for ssl without it this error is thrown,
[22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.fragbots.xyz/v2/botslist [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:92) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1490) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1488) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at java.security.AccessController.doPrivileged(Native Method) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:784) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1487) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at xyz.fragbots.api.Request.getRequest(Request.java:29) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at xyz.fragbots.api.FragBotsApi.readBotsList(FragBotsApi.java:31) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at xyz.fragbots.api.FragBotsApi.getBotList(FragBotsApi.java:48) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at xyz.fragbots.commands.FragRunCommand.lambda$processCommand$0(FragRunCommand.java:86) [22:10:47] [Thread-11/INFO] [STDERR]: [xyz.fragbots.api.Request:getRequest:40]: at java.lang.Thread.run(Thread.java:748)

Edit: Might not be ssl I just remember reading that in a stackoverflow post (https://stackoverflow.com/questions/13670692/403-forbidden-with-java-but-not-web-browser) but nevertheless there is still the issue

@IshaanRao
Copy link
Owner

Changing to http still shows that error which is why I said might not be ssl

@MySixSenses
Copy link
Author

MySixSenses commented May 26, 2021

Changing to http still shows that error which is why I said might not be ssl

Then it's likely the server blocking requests to the api that are from bots. Might be a configuration problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants