254 Commits

Author SHA1 Message Date
Alessandro Pasotti
569593b79a [server] Python plugins API cleanup part 3
This removes the handleRequest method that returns the
headers and body as byte array.

This superceeded by the implementation that takes a
request and response instances.
2017-05-03 10:58:18 +02:00
Alessandro Pasotti
2afcad279d [server] Python plugins API cleanup part 2
This part adds the headers as an optional argument
to the request and start using the handleRequest(request, response)
call in the python tests.

Some additional tests are also added.
2017-05-03 10:58:18 +02:00
Alessandro Pasotti
b7d6c1e59e [server] Python plugins API cleanup part 1
This is the first step to a cleaner and consitent API
for server plugin.

It also adds some new tests for the base request and
response classes
2017-05-03 10:57:39 +02:00
Denis Rouzaud
85f3b81b55 remove double spaces in sip files
fix indentation
2017-05-03 08:02:14 +02:00
Denis Rouzaud
7d459149c7 [sip] align missing bits and replace nullptr by 0 2017-05-02 08:09:53 +02:00
Denis Rouzaud
93971d5ed3 [sip] align pointer and reference in blacklisted files
this will facilitate sip diff checking
2017-05-01 17:49:43 +02:00
Alessandro Pasotti
cbcd193875 [server] Add to API break and pass enum by value 2017-04-22 13:56:00 +02:00
Alessandro Pasotti
c2ba23173a [server] handleRequest accept QgsServerRequest.Method instead of a string
Also made this optional
2017-04-22 11:05:06 +02:00
Alessandro Pasotti
7f08e7206f [server] More Qt-style getter changes getHeader( key ) -> header( key ) 2017-04-22 10:27:10 +02:00
Alessandro Pasotti
d03b005969 [server] Expose HTTP status code and test refactoring
* Renamed returnCode to statusCode (as per RFC https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)
* Expose statusCode to server iface
* API Break: Renamed getHeader() to header() Qt-style
* Split server plugin filter tests in its own test file
* Added tests for clearBody() and body() getter
2017-04-22 10:17:08 +02:00
David Marteau
018d2a24fb Server: pass full url string and data to handleRequest()
Fix tests by removing passing url pieces from environment
2017-04-21 17:38:25 +02:00
David Marteau
a55390e319 Restore body() accessor in QgsRequestHandler
Restore clearBody() method in QgsRequestHandler
2017-04-21 14:33:10 +02:00
rldhont
d018f0329a [Server] remove QgsWfsProjectParser 2017-04-08 17:07:17 +02:00
rldhont
04ed2b4dcd [Server] WFS GetCapapbilities and DescribeFeatureType refactoring
Remove QgsWFSProjectParser from GetCapabilities and DescribeFeatureType
2017-04-08 17:06:56 +02:00
rldhont
98d323edb1 [Server] Remove QgsWCSProjectParser 2017-02-27 16:55:00 +01:00
Blottiere Paul
44da573002 replace class by namespace 2017-01-30 08:21:06 +01:00
Blottiere Paul
5594418113 fix typo 2017-01-30 08:21:06 +01:00
Blottiere Paul
5c8360dba2 [server] WIP clean project parsing by using QgsProject 2017-01-30 08:21:05 +01:00
Juergen E. Fischer
6a56cb0dd0 updates and fixes for windows qt5/py3 build 2017-01-24 01:25:59 +01:00
Denis Rouzaud
4c3968b9aa more spelling fixes 2017-01-20 15:06:09 +01:00
David Marteau
e17a7d4e21 Move wcs as service module 2017-01-17 22:02:02 +01:00
David Marteau
56b2f08865 Move wfs as service module 2017-01-17 17:21:25 +01:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
David Marteau
8b0526d678 Revisit server exceptions
- Add server exception base class
    - Enable per service exception definition
    - Handle QgsException gracefully (error 500)
    - Handle OGC exception versioning
2017-01-14 22:17:45 +01:00
Nyall Dawson
231f6af0e1 Don't return const references to implicitly shared Qt classes
Instead return the inexpensive copies. Should provide extra safety
against issues like #14822

(refs #14822)
2017-01-14 15:53:45 +10:00
Blottiere Paul
932d9fb5d3 [server] parallel map rendering 2017-01-13 09:24:31 +01:00
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Denis Rouzaud
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +01:00
David Marteau
4f996980be Replace headersWritten by headersSent 2017-01-10 14:34:18 +01:00
David Marteau
3f41db3759 Fix sip syntax error 2017-01-10 14:34:18 +01:00
David Marteau
bfc081d3dd Fix indent and documentation 2017-01-10 14:34:18 +01:00
David Marteau
262969015d Add headers keys and value accessors 2017-01-10 14:34:18 +01:00
David Marteau
12f3b5fae7 QgsRequestHandler is now a concrete class
I/O transactions are now abstracted with QgsServerRequest/QgsServerResponse
    So there is no need for another abstraction layer
2017-01-10 14:34:17 +01:00
David Marteau
64fc56c808 Implement QgsFcgiRequest and QgsFcgiResponse 2017-01-10 14:34:17 +01:00
David Marteau
fc7c0f0560 Fix indent 2017-01-10 14:34:17 +01:00
David Marteau
fcacb2899f Fix coding style and update comments 2017-01-10 14:34:16 +01:00
David Marteau
689f3b1ab2 Expose QgsServerInterface to service modules
* Instanciate QgsServerInterface even if HAVE_SERVER_PYTHON_PLUGINS is
      not defined
    * Pass QgsServerInterface in module registration methods.
    * Add QgsServer initialisation test

 #Please enter the commit message for your changes. Lines starting
2017-01-10 14:34:16 +01:00
David Marteau
2adbaf0899 Add parameter map accessor from QgsServerRequest 2017-01-10 14:34:16 +01:00
David Marteau
ec226eeab8 Add extra parameter QgsProject* to QgsService::executeRequest 2017-01-10 14:34:16 +01:00
David Marteau
bac1890f9c fix typo, use Q_UNUSED, return null/empty QString() instead literal empty string 2017-01-10 14:34:16 +01:00
David Marteau
705547e617 Removed python loader: added unRegisterService() method 2017-01-10 14:34:16 +01:00
David Marteau
4c8a5cbdd8 fix indent 2017-01-10 14:34:16 +01:00
David Marteau
89859ef1b6 Server refactoring: Added sample native service module; fixed typo 2017-01-10 14:34:16 +01:00
David Marteau
af5eed1a4b Add getHeader() method to QgsServerRequest 2017-01-10 14:34:15 +01:00
David Marteau
7600919517 Remove Service Entry class and move name/version infos in QgsService 2017-01-10 14:34:15 +01:00
David Marteau
53555581a3 Server refactoring: Fix doc and comments
Fix typo in doc and comments
    Update documentation
    Fix return of implicitely shared objects
    Fix order of parameters in QgsServiceRegistry::registerService
2017-01-10 14:34:15 +01:00
David Marteau
1e0d830529 Server refactoring: implements service modules registry
Implementation for https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74
2017-01-10 14:34:15 +01:00
rldhont
3e80a52995 Revert "Merge pull request #3886 from pblottiere/servermultithread"
This reverts commit 350a2b513446462120946241cf7fb1bb67ca828b, reversing
changes made to 590a981195289be702bc7bf5382ece25a09ae6bb.
2017-01-09 14:05:28 +01:00
Blottiere Paul
f7729b3096 [server] parallel map rendering 2017-01-02 22:13:45 +01:00
Blottiere Paul
f3a5c98178 remove QgsMapRenderer 2016-12-12 07:50:22 +01:00