Pierce Lopez

Results 269 comments of Pierce Lopez

fwiw the docs do include: > If the caller knows that they are at the end of their input, the length passed MUST include the final '\0' character, so values...

I was curious what jansson does for loop detection when serializing to a string, and found that it adds the addresses of arrays and objects to a "parents" hash table...

If you use `json_object_get()` before `json_object_clear()`, then use the thing you got out of the object after the clear, that is invalid and would cause a segfault. If you will...

`json_load_file()` takes `const char *path` and passes it directly to `fopen()`: https://github.com/akheron/jansson/blob/v2.12/src/load.c#L1074 On a linux or mac system, these file path C strings would be encoded in utf8. Windows has...

correction: the mode "ccs=UTF-8" is for transforming the file contents, it does not apply to the path argument, nevermind that idea

Looks like they already fixed it that way: https://github.com/HandBrake/HandBrake/commit/cd252068e94ea1edff177e5abe93c38c5eb6a037 (`hb_fopen()` uses `_wfopen_s()` on windows, and converts path to utf16 for it)

I think this is just because there are no nsqd which are known to have that topic. nsqadmin queries nsqlookupd for a topic to find all nsqd which have it...

This is a pretty special case. I think it would be reasonable for you to sub-class `StaticFileHandler` and override just `get_content_size()` (to set e.g. `self.orig_size`) and `get_content()` (to use `self.orig_size`...

The relevant code in master (and the 6.0 branch) for `simple_httpclient`: ```python timeout = min(self.request.connect_timeout, self.request.request_timeout) if timeout: self._timeout = self.io_loop.add_timeout( self.start_time + timeout, functools.partial(self._on_timeout, "while connecting"), ) stream =...