-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Server: Restore body() accessor in QgsRequestHandler #4391
Conversation
5eb5a0e
to
35eed2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes!
I just added some minor notes, please have a look.
src/server/qgsserverresponse.h
Outdated
* Get the data written so far | ||
* | ||
* This is implementation dependant: some implementations may not | ||
* give access to the underlyng and return an empty array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/underlyng/underlying/
BTW don't get why you stress that it might return an empty array. Are you thinking at the a streaming response case?
In that case, the reason for getting an empty array would be dependant on the moment that this function is called: if it's called in responseComplete()
you might get an empty array, but if called in sendResponse()
you should get the current chunk, as you correctly mention here below.
Or am I missing something?
python/server/qgsrequesthandler.sip
Outdated
@@ -17,7 +17,7 @@ | |||
* Examples of possible mechanisms are cgi Get, cgi Post, SOAP or the usage | |||
* as a standalone command line executable | |||
*/ | |||
class QgsRequestHandler /Abstract/ | |||
class QgsRequestHandler / Abstract / |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: these extra spaces are from the astyle
command? Or from sipify
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use qgisstyle and qgisstyle introduces syntax errors in sip files.
python/server/qgsserverresponse.sip
Outdated
/** | ||
* Truncate internal buffer | ||
*/ | ||
virtual void truncate() = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the use case for truncate()
? Is that really necessary?
Restore clearBody() method in QgsRequestHandler
35eed2f
to
a55390e
Compare
Description
Restore body() accessor and clearBody() method in QgsRequestHandler. This feature was removed
and thus was preventing replacing/editing response body in server plugins.