Commit Graph

3411 Commits

Author SHA1 Message Date
Andrew Bettison
404cc1476d Improve HTTP Origin header parsing
Parses the separate parts of the URI: scheme, hostname, port.
No longer supports "Origin: null", because that is not in the
spec.
2015-10-01 07:05:17 +09:30
Andrew Bettison
367d54f5f8 Add functions to parse uint16_t 2015-10-01 07:05:17 +09:30
Andrew Bettison
f73cd77185 Change arg of ctype functions from char to int
Consistent with functions defined in <ctype>; now all can be used
as a predicate function with the type int (*)(int).
2015-10-01 07:05:17 +09:30
Jeremy Lakeman
2fdd23e864 Do not add name and number to seeded keyring entry 2015-09-28 12:04:13 +09:30
Jeremy Lakeman
41d416977f Deprecate java command line api to keyring commands 2015-09-28 12:03:39 +09:30
Jeremy Lakeman
75df3bd4ec Format network addresses using posix API 2015-09-28 11:58:48 +09:30
Jeremy Lakeman
79e8a94792 Add route_link.h 2015-09-28 11:58:48 +09:30
Andrew Bettison
a276fc9d28 Remove Rhizome enabled test from Keyring REST API 2015-09-28 09:56:15 +09:30
Andrew Bettison
6123503c15 Improve Rhizome HTTP status codes
Also improve some reason phrases and test them
2015-09-21 18:43:24 +09:30
Andrew Bettison
96055e6b6c Fix test failure in HTTP POST /rhizome/import
Introduced in edc8aba
2015-09-21 18:43:24 +09:30
Andrew Bettison
3c18b7a3d9 Add missing header dependencies to Makefile 2015-09-21 12:45:03 +09:30
Andrew Bettison
487fe462b2 Add "extern" to some array decls in str.h 2015-09-21 12:30:36 +09:30
Andrew Bettison
7635e6b71b Add Keyring Java API (incomplete) with tests
keyringListIdentities()
keyringSetDidName()
2015-08-31 19:16:30 +09:30
Andrew Bettison
0e783c6b73 Fix malformed HTTP output of JSON fields 2015-08-31 19:16:30 +09:30
Andrew Bettison
714ea63190 Change JSON response of GET HTTP /restful/keyring/...
Return "sid", "did" and "name" fields inside their own "identity"
object
2015-08-31 19:16:30 +09:30
Andrew Bettison
e956749727 Move utility functions from 'rhizomejava' test to testdefs_java.sh 2015-08-31 19:16:30 +09:30
Andrew Bettison
6486b3f469 Improve test defs create_identities()
Only set $DIDA1, $NAMEA1, etc. vars if the identity has a DID or
Name field
2015-08-31 19:16:30 +09:30
Andrew Bettison
71c7a4f870 strbuf_json_atom() supports JSON objects and arrays 2015-08-31 19:16:30 +09:30
gardners
edc8aba100 remove hard-wired references to "data" and replace with PART_PAYLOAD 2015-08-31 15:31:58 +09:30
gardners
a93c711952 honour instance path for http rhizome/import function. 2015-08-31 15:13:35 +09:30
Andrew Bettison
85a15cb01f Merge branch 'keyring-restful' into 'development' 2015-08-24 23:16:10 +09:30
Andrew Bettison
8ba612ffa1 HTTP GET /restful/keyring/set[?pin=PIN][&did=DID][&name=Name] 2015-08-24 22:54:45 +09:30
Andrew Bettison
8834a81575 Refactor HTTP GET /restful/keyring/add 2015-08-24 22:44:24 +09:30
Andrew Bettison
380a72113c pin= query param for HTTP GET /restful/keyring/identities.json 2015-08-24 22:41:53 +09:30
Andrew Bettison
564f8973af Improve test defs: create_identities() with PINs 2015-08-24 22:41:53 +09:30
Andrew Bettison
b7ba297e31 Add TODO comments to randomise keyring slot allocation 2015-08-24 22:41:53 +09:30
Andrew Bettison
166a03c7c6 Remove useless safety checks 2015-08-24 22:41:53 +09:30
Andrew Bettison
73ced0f93a pin= query param for HTTP GET /restful/keyring/add 2015-08-24 22:41:53 +09:30
Andrew Bettison
ce7a6ba988 HTTP server: parse query parameters 2015-08-24 22:41:53 +09:30
Jeremy Lakeman
00a2ea2913 Ignore potential race condition between setting up instance path and first log message 2015-08-24 16:38:55 +09:30
gardners
52bd428c09 make rhizome http port number configurable via serval.conf 2015-08-24 16:06:25 +09:30
Jeremy Lakeman
84caf21969 Use section linking to define httpd pages 2015-08-24 12:49:09 +09:30
gardners
dab244d92f shorten section names (and precursors) to keep in the 16 char limit
of the O-MACH assembler on OSX.
2015-08-24 10:17:04 +09:30
Andrew Bettison
0a40d9849c Add uri and www-form-uri encode/decode functions 2015-08-17 19:46:50 +09:30
Andrew Bettison
e73d50b48a Refactor "str.h": rename parameters 'dstlen' to 'dstsiz' 2015-08-17 19:43:58 +09:30
Andrew Bettison
586c6b3060 Add HTTP GET /restful/keyring/add 2015-08-10 18:13:57 +09:30
Jeremy Lakeman
c2a47c7960 Don't log cli args unless debug.verbose is set 2015-08-10 11:41:38 +09:30
Jeremy Lakeman
deb1027024 Ignore duplicate link layer packets, eg bluetooth names 2015-08-03 11:12:39 +09:30
Jeremy Lakeman
298849b25b Add buffer space for MDP MTU & headers for MDP_INTERFACE 2015-07-20 16:48:17 +09:30
Andrew Bettison
0a061e0fe8 Include "whence.h" instead of "log.h" where suitable
Some inclusions of "log.h" were simply to get struct __sourceloc and
__WHENCE__
2015-07-13 18:24:16 +09:30
Andrew Bettison
52106b5026 Move DEBUGF() from "log.h" to "debug.h"
Include "debug.h" in lots of places (not all)
New macro IDEBUGF() for indirect debug flag, used in HTTP server
2015-07-13 18:24:04 +09:30
Andrew Bettison
7d9a5faa4e Move if(config.debug.xxx) tests into DEBUGF()
Original DEBUG() and DEBUGF() macros renamed to _DEBUG() and _DEBUGF()
New DEBUG() and DEBUGF() macros, first argument is flagname
New DEBUGF2(foo, bar, ...) macro does if(config.debug.foo||config.debug.bar) test
Replace almost all config.debug.xxx references to IF_DEBUG(xxx)
2015-07-13 16:00:05 +09:30
Andrew Bettison
abb2a39330 Fix MeshMS REST newsince race condition
During GET /restful/meshms/SID1/SID2/newsince/messagelist.json, if a new
message was received before the request reached the end of its message
iterator and paused, then the new message did not make it into the
output.
2015-06-29 15:39:19 +09:30
Andrew Bettison
9f15c4770c Add [httpd/N] context to HTTP server logging 2015-06-29 15:39:19 +09:30
Andrew Bettison
0ac9d15b8f Rename variable to current_httpd_request_count 2015-06-29 15:39:19 +09:30
Andrew Bettison
cf0e1aa8d6 Add log_context 2015-06-29 15:39:19 +09:30
Andrew Bettison
8d799840df Add alloca_sourceloc(), refactored from log.c 2015-06-29 15:39:19 +09:30
Andrew Bettison
819fa8bee4 No time stamps in Android log by default 2015-06-29 15:39:19 +09:30
Andrew Bettison
8ac156376d Fix MeshMS Java API when MeshMS disabled
If the MeshMS REST API is disabled, then the JSON response omits the
MeshMS status code, so the Java client API now handles this case.
2015-06-29 15:39:19 +09:30
Jeremy Lakeman
4891348684 Ensure unicode strings are correctly handled 2015-06-29 15:12:05 +09:30