Permalink
Browse files

trying to fix url encoding on NaCl

  • Loading branch information...
1 parent f06c720 commit 978f7a0b58dff23ccd1e321b5d73cb726bc5e57f Will committed Jan 21, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 barebones/main.cpp
View
@@ -51,7 +51,14 @@ namespace {
pimpl(p), name(n), callback(cb), data(d), ok(false), cancelled(false)
#ifdef __native_client__
, nc_url_loader(p.instance), nc_url_info(p.instance) {
- nc_url_info.SetURL(pp::Var(name));
+ std::string url;
+ for(size_t i=0; i<name.size(); i++) {
+ if(name.at(i) == '#')
+ url += "%23";
+ else
+ url += name.at(i);
+ }
+ nc_url_info.SetURL(pp::Var(url));
if(PP_OK_COMPLETIONPENDING != nc_url_loader.Open(nc_url_info,pp::CompletionCallback(nc_url_open,this)))
nc_url_do_read(); //### this flow untested; chrome has always returned PP_OK_COMPLETIONPENDING in testing
}

0 comments on commit 978f7a0

Please sign in to comment.