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

RFC7959 - blockwise for error responses? #25

Open
boaks opened this issue Sep 6, 2022 · 4 comments
Open

RFC7959 - blockwise for error responses? #25

boaks opened this issue Sep 6, 2022 · 4 comments

Comments

@boaks
Copy link

boaks commented Sep 6, 2022

I currently hit a "very special case".

A coap2http proxy receives an http error (404) and a page with about 2k.

If the 404 is translated into 4.04, "my stack" (Eclipse/Californum) refuses to do that as blockwise transfer.

So, are error responses considered to be transferred with blockwise with block2?
I didn't found something in RFC7959, but maybe I overseen it.

@boaks
Copy link
Author

boaks commented Sep 6, 2022

I found an answer in issue #21.

The resulting question will be, if it's not possible, to have a blockwise error-response, what is then considered to be the payload in that proxy use-case?

@chrysn
Copy link
Member

chrysn commented Sep 6, 2022 via email

@mrdeep1
Copy link

mrdeep1 commented Sep 6, 2022

The data in a HTTP 404 response in my experience is used to give some clues (with marginal benefit, but looks pretty) as to why the server had to generate a 404 error, but is really down to the page is not available. Thus, dropping the data provided in the HTTP response is no great loss from my point of view.

However, if the CoAP is going to be converted back to html in a downstream proxy it would be nice to have some basic html in the 4.04 CoAP response body that is used to state the obvious. So, perhaps on converting from html to CoAP instead of dropping all the html that is too large, a simple piece of basic html is used instead otherwise the downstream proxy will need some smarts to build a 404 response page - which is unlikely.

@boaks
Copy link
Author

boaks commented Sep 6, 2022

Thanks both for your feedback.
I don't think, it pays off to support http-coap-http.
I guess, I try to check, if it's html, and then try to grab the <body>, otherwise just truncate it.

boaks added a commit to boaks/californium that referenced this issue Sep 8, 2022
See core-wg/corrclar#25

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
boaks added a commit to eclipse-californium/californium that referenced this issue Sep 8, 2022
See core-wg/corrclar#25

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
@cabo cabo transferred this issue from core-wg/corrclar-old Jul 22, 2023
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

3 participants