Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat URI_PORT as a known option in proxy server #26

Closed
pacheco017 opened this issue Jul 24, 2015 · 1 comment
Closed

Treat URI_PORT as a known option in proxy server #26

pacheco017 opened this issue Jul 24, 2015 · 1 comment

Comments

@pacheco017
Copy link

Current implementation of proxy server replies with

4.02 Bad Option
Unsafe options in request: URI_PORT

when a client makes a request through it specifying the port it wants to use.

Is there any rationale behind treating URI_PORT as a not-known option in proxy.server.raise_unless_safe?

Adding URI_PORT to the set of known options lets the request reach the desired server and the final response arrive to the client.

Example:
# Server listening on 172.17.0.26:5683
./server.py
# Reverse Proxy listening on 172.17.0.46:6666, forwards requests to the server above
./coap-proxy --reverse --server-address 172.17.0.46 --server-port 6666 --pathbased "xyz":"172.17.0.26"
# Client on 172.17.0.27, requests to the proxy server
./coap-client -v coap://172.17.0.46:6666/xyz/time
4.02 Bad Option
Unsafe options in request: URI_PORT

Adding URI_PORT to the set of known options in proxy.server.raise_unless_safe lets the client get the expected reply from the server:

# Same setup as above
./coap-client.py -v coap://172.17.0.46:6666/xyz/time
2015-07-24 12:39
(No newline at end of message)
chrysn added a commit that referenced this issue Sep 16, 2015
@chrysn
Copy link
Owner

chrysn commented Sep 16, 2015

it's just an oversight

@chrysn chrysn closed this as completed Sep 16, 2015
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

No branches or pull requests

2 participants