Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libwebsockets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Fork
libwebsockets
Commits
9e8d1489
Commit
9e8d1489
authored
9 years ago
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
changelog pre v1.6.0
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
4588e4e4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
changelog
+47
-0
47 additions, 0 deletions
changelog
with
47 additions
and
0 deletions
changelog
+
47
−
0
View file @
9e8d1489
Changelog
---------
v1.6.0-chrome48-firefox42
=======================
Major API improvements
----------------------
v1.6.0 has many cleanups and improvements in the API. Although at first it
looks pretty drastic, user code will only need four actions to update it.
- Do the three search/replaces in your user code, /libwebsocket_/lws_/,
/libwebsockets_/lws_/, and /struct\ libwebsocket/struct\ lws/
- Remove the context parameter from your user callbacks
- Remove context as the first parameter from the "Eleven APIS" listed in the
User Api Changes section
- Add lws_get_context(wsi) as the first parameter on the "Three APIS" listed
in the User Api Changes section, and anywhere else you still need context
That's it... generally only a handful of the 14 affected APIs are actually in
use in your user code and you can find them quickest by compiling and visiting
the errors each in turn. And the end results are much cleaner, more
predictable and maintainable.
User api additions
------------------
...
...
@@ -44,6 +70,27 @@ authentication and state to be used when interpreting the file request.
2) A new API void * lws_wsi_user(struct lws *wsi) lets you get the pointer to
the user data associated with the wsi, just from the wsi.
3) URI argument handling. Libwebsockets parses and protects URI arguments
like test.html?arg1=1&arg2=2, it decodes %xx uriencoding format and reduces
path attacks like ../.../../etc/passwd so they cannot go behind the web
server's /. There is a list of confirmed attacks we're proof against in
./test-server/attack.sh.
There is a new API lws_hdr_copy_fragment that should be used now to access
the URI arguments (it returns the fragments length)
while (lws_hdr_copy_fragment(wsi, buf, sizeof(buf),
WSI_TOKEN_HTTP_URI_ARGS, n) > 0) {
lwsl_info("URI Arg %d: %s\n", ++n, buf);
}
For the example above, calling with n=0 will return "arg1=1" and n=1 "arg2=2".
All legal uriencodings will have been reduced in those strings.
lws_hdr_copy_fragment() returns the length of the x=y fragment, so it's also
possible to deal with arguments containing %00. If you don't care about that,
the returned string has '\0' appended to simplify processing.
User api changes
----------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment