-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for getting/setting environment variables using byte strings
This commit allows applications to pass in byte strings in addition to Unicode strings when setting environment variables. As before, Unicode strings will be UTF-8 encoded, but byte strings can support passing binary data, or text encoded with other encodings. On the server side, a new get_environment_bytes() method can be used to get the environment variables as a dictionary with byte srtings as the keys and values, instead of the Unicode strings returned by get_environment(), allowing access to the raw binary data. The existing get_environment() remains available, but it will only provide access to the environment variables which have valid UTF-8 keys and values. It is up to the applicaiton code to know what encoding (if any) should be used when getting or setting environment variables.
- Loading branch information
Showing
4 changed files
with
275 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.