Search Results

Search found 135 results on 6 pages for 'chunked'.

Page 4/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Connecting a network printer via a Thecus N2100 - works in Vista, not in Windows 7

    - by Jon Skeet
    I have a Lexmark E250d printer attached to a Thecus N2100 NAS. On Windows Vista I've managed to configure this using an "Internet" printer port with the URL of http://thecus:631/printers/usb-printer. I can add a printer in a similar way in Windows 7, but it never manages to print the test page. If I go to "Configure Port" in Vista, it just has "Security Options" - on Windows 7 it's asking about Raw mode vs LPR mode etc. On Vista I'm using an E250d-specific driver from Lexmark; on Windows 7 there's a Microsoft E250d driver, or a Universal PCL XL driver from Lexmark... I wouldn't expect this different to be related to the problem, but I thought I'd mention it anyway. (Lexmark doesn't have a Windows 7 E250d-specific driver as far as I can see.) Any suggestions? I was thinking of upgrading my main laptop from Vista to Windows 7, but I'd really like to get this sorted first... EDIT: If I connect to http://thecus:631/printers/usb-printer via Chrome while capturing with Wireshark, I get this response: HTTP/1.1 200 OK Date: Wed, 06 Jan 2010 16:47:23 GMT Connection: Keep-Alive Keep-Alive: timeout=60 Content-Language: C Transfer-Encoding: chunked Content-Type: text/html;charset=iso-8859-1 0 No idea what that's meant to be doing... EDIT: On further consultation, this would appear to be the Internet Printing Protocol which is layered on HTTP. Printing a test page successfully from Vista posts to that URL. Will attempt the same on Windows 7...

    Read the article

  • nginx and proxy_hide_header

    - by giskard
    When I curl for a URL I get this answer back: > < HTTP/1.1 200 OK < Server: nginx/0.7.65 < Date: Thu, 04 Mar 2010 12:18:27 GMT < Content-Type: application/json < Connection: close < Expires: Thu, 04 Mar 2010 12:18:27 UTC < http.context.path: /1/ < jersey.response: com.sun.jersey.spi.container.ContainerResponse@17646d60 < http.custom.headers: {Content-Type=text/plain} < http.request.path: /2/messages/latest.json < http.status: 200 < Transfer-Encoding: chunked I want to remove < http.context.path: /1/ < jersey.response: com.sun.jersey.spi.container.ContainerResponse@17646d60 < http.custom.headers: {Content-Type=text/plain} < http.request.path: /2/messages/latest.json < http.status: 200 So I used the proxy_hide_header directive in this way: location / { if ($arg_id) { proxy_pass http..authorized; break; } proxy_pass http..anonymous; proxy_hide_header http.context.path; proxy_hide_header jersey.response; proxy_hide_header http.request.path; proxy_hide_header http.status ; } But it doesn't work. any clues?

    Read the article

  • Varnish returning 503, FetchError (could not get storage)

    - by Archan
    On the current setup we're running into a problem with Varnish, we're running a CentOS 5.7 x86_64 xenpv, with Cpanel WHM, hosted at VPS.net. Sometimes we will recieve a Guru Meditation from Varnish, and when we look in the varnishlog with the following command varnishlog -d -c -m TxStatus:503 it returns output similar to the following: 15 VCL_call c recv 15 VCL_acl c NO_MATCH devs 15 VCL_return c pass 15 VCL_call c hash 15 Hash c **** 15 Hash c ************* 15 VCL_return c hash 15 VCL_call c pass pass 15 Backend c 12 default default 15 TTL c 1835862523 RFC 0 -1 -1 1332454056 0 1332454055 375007920 0 15 VCL_call c fetch hit_for_pass 15 ObjProtocol c HTTP/1.1 15 ObjResponse c OK 15 ObjHeader c Date: Thu, 22 Mar 2012 22:07:35 GMT 15 ObjHeader c Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 mod_fcgid/2.3.6 15 ObjHeader c X-Powered-By: PHP/5.3.9 15 ObjHeader c Expires: Thu, 19 Nov 1981 08:52:00 GMT 15 ObjHeader c Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 15 ObjHeader c Pragma: no-cache 15 ObjHeader c Content-Type: text/html; charset=utf-8 15 ObjHeader c X-Cacheable: NO:Cache-Control=private 15 FetchError c chunked read_error: 12 (Could not get storage) 15 VCL_call c error deliver 15 VCL_call c deliver deliver As far as I have could gather, we could try increasing the nuke_limit, but currently we have a nuke_limit of 500, and when running varnishstat -1 -f n_lru_nuked we "only" get a total of 1031, even though we have seen the error happen on several pages. When we then run top to see how much memory Varnish is using, it only shows that it is using 763m, although we've set it to be allowed to use 1200m. Any ideas of what the problem can be?

    Read the article

  • Nginx server 301 Moved permanently

    - by user145714
    When I did a curl -v http://site-wordpress.com:81 I received this result: About to connect() to site-wordpress.com port 81 (#0) Trying ip... connected Connected to site-wordpress.com (ip) port 81 (#0) GET / HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 NSS/3.12.6.2 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 Host: site-wordpress.com:81 Accept: / < HTTP/1.1 301 Moved Permanently < Server: nginx/1.2.4 < Date: Fri, 16 Nov 2012 16:28:19 GMT < Content-Type: text/html; charset=UTF-8 < Transfer-Encoding: chunked < Connection: keep-alive < X-Pingback: The URL above/xmlrpc.php < Location: The URL above Seems like this line in my fastcgi_params is causing grief. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; If I remove this line , I get HTTP/1.1 200 OK but I get a blank page. This is my config: server { listen 81; server_name site-wordpress.com; root /var/www/html/site; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; index index.php; if (!-e $request_filename){ rewrite ^(.*)$ /index.php break; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; # port where FastCGI processes were spawned fastcgi_index index.php; include /etc/nginx/fastcgi_params; include /etc/nginx/mime.types; } location ~ \.css { add_header Content-Type text/css; } location ~ \.js { add_header Content-Type application/x-javascript; } } This config works with ip and port 80. But now I need to use a domain name and port 81, which doesn't work. Could someone please help. Thanks.

    Read the article

  • One single page showing 3 requests (also printing the headers)

    - by Korcholis
    Someone in my studio designed a webpage some years ago, and now the client decided to change the server (he moved to a Linux Apache server running Gen2 SMP, 64 bits, PHP version 5.3.8, Standard MYSQL version 5). It suddenly started to do weird things. When clicking on a link that requires login, the page redirects you to the login page using header() function in PHP. Curiously, the page shows this: OK The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. HTTP/1.1 200 OK Date: Mon, 15 Oct 2012 17:27:32 GMT Server: Apache/2.2.22 (Unix) FrontPage/5.0.2.2635 X-Powered-By: PHP/5.3.8 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Keep-Alive: timeout=5, max=399 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 232c Then the page itself, and then, another header: 0 1f4 OK The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. 0 What's most intriguing is that if you refresh the page or hit enter on the url, it loads correctly. I've been checking the logs, and it only blames of an inexisting favicon. I also checked the .htaccess, everything was correct (RewriteBase was / as intended, and the only stuff there is another rule that moves ^en/ requests to request?lang=en. Has anyone faced something like this? Edit: IE doesn't trigger these two headers. This is getting wierder.

    Read the article

  • NGINX + PHP-FPM - Strange issue when trying to display images via php-gd / readfile - Connection wont terminate

    - by anonymous-one
    Ok, to get the details out of the way: The php script can be anything as simple as: <? header('Content-Type: image/jpeg'); readfile('/local/image.jpg'); ?> When I try to execute this via nginx + php-fpm what happens is the image shows up in the browser, here is what happens: IE - The page stays blank for a long period of time, and eventually the image is shown. Chrome - The image shows, but the loading spinner spins and spins for a long period of time. Eventually the debugger will show the image in red as in error, but the image shows up fine. Everything else on the server works great. Its pushing out about 100mbit steady serving static content. So this is definatly a php-fpm related issue. I THINK this may have something to do with the chunked encoding being sent back wrong? Also, I threw in a pause before the image was read, and got the pid of the fpm process, and it looks as tho its terminatly correctly (from strace): shutdown(3, 1 /* send */) = 0 recvfrom(3, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8 recvfrom(3, "", 8, 0, NULL, NULL) = 0 close(3) = 0 The above was dumped long before ie/chrome decided to give up (even tho the image was shown) loading the image. Displaying HTML / text content is fine. Big bodies etc all load nice and fast and terminate right away (as they should). Doing something like: THIS IS THE IMAGE ---BINARY DUMP OF IMAGE--- Works fine too. Any ideas?

    Read the article

  • Sinatra and XML POST request

    - by user292815
    I don't know is it my mistake or no. So i have that code: <code> post '/singin/get_token' do content_type :xml puts request.body.read puts xmlRequest xmlRequest = REXML::Document.new(request.body.read) ... </code> And when i post something like that: <code> <?xml version="1.0" encoding="utf-16"?><request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><username>adsfasdf</username></request> </code> I receive that in my console: <code> 127.0.0.1 - - [12/Mar/2010 21:18:20] "POST /singin/get_token HTTP/1.1" 500 105872 0.1339 Iconv::InvalidCharacter - ">": /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/encodings/ICONV.rb:7:in `conv' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/encodings/ICONV.rb:7:in `decode_iconv' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:58:in `encoding=' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:46:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:164:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:17:in `new' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:17:in `create_from' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:146:in `stream=' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:123:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `new' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/document.rb:228:in `new' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/document.rb:228:in `build' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize' zaiaku-game-server.rb:70:in `new' zaiaku-game-server.rb:70:in `block in <main>' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/handler/thin.rb:14:in `run'Iconv::InvalidCharacter: ">" /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/encodings/ICONV.rb:7:in `conv' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/encodings/ICONV.rb:7:in `decode_iconv' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:58:in `encoding=' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:46:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:164:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:17:in `new' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/source.rb:17:in `create_from' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:146:in `stream=' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:123:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `new' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `initialize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/document.rb:228:in `new' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/document.rb:228:in `build' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize' zaiaku-game-server.rb:70:in `new' zaiaku-game-server.rb:70:in `block in <main>' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:811:in `call' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:811:in `block in route' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:488:in `instance_eval' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:488:in `route_eval' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:477:in `block (2 levels) in route!' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:474:in `catch' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:474:in `block in route!' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:453:in `each' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:453:in `route!' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:569:in `dispatch!' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:388:in `block in call!' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:536:in `instance_eval' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:536:in `block in invoke' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:536:in `catch' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:536:in `invoke' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:388:in `call!' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:377:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:928:in `block in call' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:973:in `synchronize' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:928:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:76:in `block in pre_process' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in `catch' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in `pre_process' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:57:in `process' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:42:in `receive_data' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in `start' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/server.rb:156:in `start' /Users/andoriyu/.gem/ruby/1.9.1/gems/rack-1.1.0/lib/rack/handler/thin.rb:14:in `run' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/base.rb:896:in `run!' /Users/andoriyu/.homebrew/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/sinatra-0.9.6/lib/sinatra/main.rb:35:in `block in <top (required)>' !! Unexpected error while processing request: incompatible character encodings: ASCII-8BIT and UTF-8 <code>

    Read the article

  • The endpoint reference (EPR) for the Operation not found is

    - by Denise Wu
    I have been struggling with the following error the last couple of days can you please help! I generated my server and client code using the wsdl2java tool from a wsdl 2.0 file. When invoking the webservice I am getting the following error: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /axis2/services/MyService/authentication/?username=Denise345&password=xxxxx and the WSA Action = null My service is displayed on the axis2 webpage with all available methods. Here is the output from TcpMon ============== Listen Port: 8090 Target Host: 127.0.0.1 Target Port: 8080 ==== Request ==== GET /axis2/services/MyService/authentication/?username=Denise345&password=xxxxx HTTP/1.1 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 SOAPAction: "" User-Agent: Axis2 Host: 127.0.0.1:8090 ==== Response ==== HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Content-Type: application/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Thu, 12 May 2011 15:53:20 GMT Connection: close 12b <soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Text xml:lang="en-US">The endpoint reference (EPR) for the Operation not found is /axis2/services/MyService/authentication/?username=Denise345&password=xxxxx and the WSA Action = null</soapenv:Text></soapenv:Reason> 0 ============== I am using: * axis2-1.5.4 * Tomcat 7.0.8 * wsdl 2.0 file Please help!

    Read the article

  • perl Client-SSL-Warning: Peer certificate not verified

    - by Jeremey
    I am having trouble with a perl screenscraper to an HTTPS site. In debugging, I ran the following: print $res->headers_as_string; and in the output, I have the following line: Client-SSL-Warning: Peer certificate not verified Is there a way I can auto-accept this certificate, or is that not the problem? #!/usr/bin/perl use LWP::UserAgent; use Crypt::SSLeay::CTX; use Crypt::SSLeay::Conn; use Crypt::SSLeay::X509; use LWP::Simple qw(get); my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => 'https://vzw-cat.sun4.lightsurf.net/vzwcampaignadmin/'); my $res = $ua->request($req); print $res->headers_as_string; output: Cache-Control: no-cache Connection: close Date: Tue, 01 Jun 2010 19:28:08 GMT Pragma: No-cache Server: Apache Content-Type: text/html Expires: Wed, 31 Dec 1969 16:00:00 PST Client-Date: Tue, 01 Jun 2010 19:28:09 GMT Client-Peer: 64.152.68.114:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign Client-SSL-Cert-Subject: /C=US/ST=Massachusetts/L=Boston/O=verizon wireless/OU=TERMS OF USE AT WWW.VERISIGN.COM/RPA (C)00/CN=PSMSADMIN.VZW.COM Client-SSL-Cipher: DHE-RSA-AES256-SHA Client-SSL-Warning: Peer certificate not verified Client-Transfer-Encoding: chunked Link: <css/vtext_style.css>; rel="stylesheet"; type="text/css" Set-Cookie: JSESSIONID=DE6C99EA2F3DD1D4DF31456B94F16C90.vz3; Path=/vzwcampaignadmin; Secure Title: Verizon Wireless - Campaign Administrator

    Read the article

  • C# Can I return HttpWebResponse result to iframe - Uses Digest authentication

    - by chadsxe
    I am trying to figure out a way to display a cross-domain web page that uses Digest Authentication. My initial thought was to make a web request and return the entire page source. I currently have no issues with authenticating and getting a response but I am not sure how to properly return the needed data. // Create a request for the URL. WebRequest request = WebRequest.Create("http://some-url/cgi/image.php?type=live"); // Set the credentials. request.Credentials = new NetworkCredential(username, password); // Get the response. HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // Get the stream containing content returned by the server. Stream dataStream = response.GetResponseStream(); // Open the stream using a StreamReader for easy access. StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromServer = reader.ReadToEnd(); // Clean up the streams and the response. reader.Close(); dataStream.Close(); response.Close(); return responseFromServer; My problems are currently... responseFromServer is not returning the entire source of the page. I.E. missing body and head tags The data is encoded improperly in responseFromServer. I believe this has something to do with the transfer encoding being of the type chunked. Further more... I am not entirely sure if this is even possible. If it matters, this is being done in ASP.NET MVC 4 C#. Thanks, Chad

    Read the article

  • How to forward a 'saved' request stream to another Action within the same controller?

    - by Moe Howard
    We have a need to chunk-up large http requests sent by our mobile devices. These smaller chunk streams are merged to a file on the server. Once all chunks are received we need a way to submit the saved merged request to an another method(Action) within the same controller that will process this large http request. How can this be done? The code we tried below results in the service hanging. Is there a way to do this without a round-trip? //Open merged chunked file FileStream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read); //Read steam support variables int bytesRead = 0; byte[] buffer = new byte[1024]; //Build New Web Request. The target Action is called "Upload", this method we are in is called "UploadChunk" HttpWebRequest webRequest; webRequest = (HttpWebRequest)WebRequest.Create(Request.Url.ToString().Replace("Chunk", string.Empty)); webRequest.Method = "POST"; webRequest.ContentType = "text/xml"; webRequest.KeepAlive = true; webRequest.Timeout = 600000; webRequest.ReadWriteTimeout = 600000; webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials; Stream webStream = webRequest.GetRequestStream(); //Hangs here, no errors, just hangs I have looked into using RedirectToAction and RedirecctToRoute but these methods don't fit well with what we are looking to do as we cannot edit the Request.InputStream (as it is read-only) to carry out large request stream. Thanks, Moe

    Read the article

  • How does GMail implement Comet?

    - by Morgan Cheng
    With the help of HttpWatch, I tried to figure out how GMail implement Comet. I Login in GMail with two account, one in IE and the other in Firefox. Chatting in GTalk in GMail with some magic words like "WASSUP". Then, I logoff both GMail accounts, filter any http content without "WASSUP" string. The result shows which HTTP request is the streaming channel. (Note: I have to logoff. Otherwise, never-ending HTTP would not show content in HttpWatch.) The result is interesting. The URL for stream channel is like: https://mail/channel/bind?VER=8&at=xn3j33vcvk39lkfq..... There is no surprise that GMail do Comet in IE with IFRAME. The Http content starts with " Originally, I guessed that GMail do Comet in Firefox with multipart XmlHttpRequest. To my surprise, the response header doesn't have "multipart/x-mixed-replace" header. The response headers are as below: HTTP/1.1 200 OK Content-Type: text/plain; charset=utf-8 Cache-Control: no-cache, no-store, max-age=0, must-revalidate Pragma: no-cache Expires: Fri, 01 Jan 1990 00:00:00 GMT Date: Sat, 20 Mar 2010 01:52:39 GMT X-Frame-Options: ALLOWALL Transfer-Encoding: chunked X-Content-Type-Options: nosniff Server: GSE X-XSS-Protection: 0 Unfortunately, the HttpWatch doesn't tell whether a HTTP request is from XmlHttpRequest or not. The content is not HTML but JSON. It looks like a response for XHR, but that would not work for Comet without multipart/x-mixed-replace, right? Is there any way else to figure out how GMail implement Comet? Thanks.

    Read the article

  • Optimal Serialization of Primitive Types

    - by Greg Dean
    We are beginning to roll out more and more WAN deployments of our product (.Net fat client w/ IIS hosted Remoting backend). Because of this we are trying to reduce the size of the data on the wire. We have overridden the default serialization by implementing ISerializable (similar to this), we are seeing anywhere from 12% to 50% gains. Most of our efforts focus on optimizing arrays of primitive types. I would like to know if anyone knows of any fancy way of serializing primitive types, beyond the obvious? For example today we serialize an array of ints as follows: [4-bytes (array length)][4-bytes][4-bytes] Can anyone do significantly better? The most obvious example of a significant improvement, for boolean arrays, is putting 8 bools in each byte, which we already do. Note: Saving 7 bits per bool may seem like a waste of time, but when you are dealing with large magnitudes of data (which we are), it adds up very fast. Note: We want to avoid general compression algorithms because of the latency associated with it. Remoting only supports buffered requests/responses(no chunked encoding). I realize there is a fine line between compression and optimal serialization, but our tests indicate we can afford very specific serialization optimizations at very little cost in latency. Whereas reprocessing the entire buffered response into new compressed buffer is too expensive.

    Read the article

  • Docbook+Ant: Could not find variable with the name of fop.extensions

    - by rfkrocktk
    After a lot of spent time trying to get my article to compile in Ant with Docbook, I can't seem to make FO compilation work. I'm using Xalan 2.7.0, and everything else (both single-page and chunked HTML) compiles perfectly. It's only when I try to compile to FO that I get this error: Fatal Error! org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of fop.extensions Cause: org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of fop.extensions This is pretty strange and I can't seem to resolve it. I even added a <param> value defining the variable it "can't find:" <xslt style="docbook-xsl/fo/fo.xsl" in="documents/book.xml" out="output.fo"> <classpath> <fileset dir="lib" includes="**/*"/> </classpath> <param name="fop.extensions" expression="1"/> </xslt> Is there anything I can do to resolve this issue? It's really weird if you ask me. (Again, using the same code as above, all of my other Docbook compilation works just fine)

    Read the article

  • Jquery getJSON() doesn't work when trying to get data from java server on localhost

    - by bellesebastien
    The whole day yesterday I've been trying to solve this but it's proven to be very challenging for me. I'm trying to use this JS to get information from a java application I wrote. $(document).ready(function() { $.getJSON('http://localhost/custest?callback=?', function(json) { alert('OK'); $('.result').html(json.description); }); }); The Java application uses httpServer and is very basic. When I access the page 'http://localhost/custest?callback=?' with Firefox, the browser shows me the server is sending me json data and asks with what to open it with, but when I try it from a webpage using the JS above it doesn't work. The getJSON call is not successful, the alert("ok") doesn't popup at all. If it replace "http://localhost/custest?callback=?" in the JS with "http://twitter.com/users/usejquery.json?callback=?" everything works fine. An interesting thing is that if I send malformed JSON from my java server Firebug gives an error and tells me what is missing from the JSON so that mean the browser is receiving the JSON data, but when I send it correct a JSON string nothing happens, no errors, not even the alert() opens. I'm adding the headers in case you think these could be relevant. http://localhost/custest?callback=jsonp1274691110349 GET /custest?callback=jsonp1274691110349 HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept: */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: application/json Thanks for your help

    Read the article

  • Shopify JSONP issue in ajaxAPI

    - by Aaron U
    I'm getting some odd response back from shopify ajaxapi for jsonp. If you cURL a Shopify ajax api location http://storename.domain.com/cart.json?callback=handler you will get a jsonp response. But something is breaking the same request in browsers. It appears to be related to compression? Here are some responses from each browser when attempting to call the jsonp as documented. Firefox: The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. Internet Explorer: Internet Explorer cannot display the webpage Chrome/Safari/Webkit: Cannot decode raw data, or failed (chrome) Attempted use via jquery: $.getJSON('http://storename.domain.com/cart.json?callback=?', function(data) { ... }); // Results in a failed request, viewable network request panels of dev tools Here is some output from cURL including response headers: $ curl -i http://storename.domain.com/cart.json?callback=CALLBACK_FUNC HTTP/1.1 200 OK Server: nginx Date: Tue, 18 Dec 2012 13:48:29 GMT Content-Type: application/javascript; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Status: 200 OK ETag: cachable:864076445587123764313132415008994143575 Cache-Control: max-age=0, private, must-revalidate X-Alternate-Cache-Key: cachable:11795444887523410552615529412743919200 X-Cache: hit, server X-Request-Id: a0c33a55230fe42bce79b462f6fe450d X-UA-Compatible: IE=Edge,chrome=1 Set-Cookie: _session_id=b6ace1d7b0dbedd37f7787d10e173131; path=/; HttpOnly X-Runtime: 0.033811 P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR" CALLBACK_FUNC({"token":null,"note":null,"attributes":{},"total_price":0,...}) Also related unanswered here: Shopify Ajax API JSONP supported? Thanks

    Read the article

  • How to send HTTP get method with headers using CURL

    - by mithunmo
    Hello , I need to send GET Request method with the below headers . I am getting the following capture from HTTP live headers ***http://172.20.22.26/ GET / HTTP/1.1 Host: 172.20.22.26 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Authorization: Basic bWl0aHVuOm1pdGh1bg== HTTP/1.x 200 OK Date: Thu, 01 Jan 2009 00:29:20 GMT Server: HTTPsrv Connection: Keep-Alive Keep-Alive: timeout=30, max=100 Transfer-Encoding: chunked Content-Type: text/html ----------------------------**------------------------------* I am using the following program . It is not working . Please let me know where I am going wrong. <?php $credentials = "mithun:mithun"; $url = "http://172.20.22.26"; $headers = array( "GET /HTTP/1.1", "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1", "Content-type: text/xml;charset=\"utf-8\"", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language: en-us,en;q=0.5", "Accept-Encoding: gzip,deflate", "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Keep-Alive: 300", "Connection: keep-alive", "Authorization: Basic " . base64_encode($credentials)); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //curl_setopt($ch, CURLOPT_USERAGENT, $defined_vars['HTTP_USER_AGENT']); $data = curl_exec($ch); if (curl_errno($ch)) { print "Error: " . curl_error($ch); } else { // Show me the result var_dump($data); curl_close($ch); }?>

    Read the article

  • How To Disable Curl Debug Output in PHP

    - by streetparade
    I wrote a PHP CUrl Class, if i execute Methods which should return the Content, it returns at first the Headers and after that the Content. So i cant parse any XML Data. I need to Disable This Sample Output. HTTP/1.1 200 OK Date: Thu, 01 Apr 2010 20:11:58 GMT Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny4 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g X-Powered-By: PHP/5.2.6-1+lenny4 Set-Cookie: PHPSESSID=44beccf62f87546140d4a0bd24bd28b0; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Transfer-Encoding: chunked Content-Type: application/xml Here is The Curl Class <?php class Test_Curl { protected $curl; protected $headers; protected $useragent; protected $url; protected $testkey; public function __construct() { } public function setUseraget($useragent) { $this->useragent = $useragent; return $this; } public function setApiKey($key) { $this->billomatApiKey = $key; } private function curlExecGeneral() { $result = curl_exec($this->curl); curl_close($this->curl); return $result; } private function curlInitGeneral($request) { $this->curl = curl_init($request); curl_setopt($this->curl, CURLOPT_HEADER, true); curl_setopt($this->curl, CURLOPT_HTTPHEADER, array("X-testkey: ".$this->testkey, "Content-Type: application/xml")); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } public function get($request) { $this->curlInitGeneral($request); curl_setopt ($this->curl, CURLOPT_HTTPGET, true); return $this->curlExecGeneral(); } public function post($request, $xml) { $this->curlInitGeneral($request); curl_setopt ($this->curl, CURLOPT_POST, true); //set the Requestmethod to POST curl_setopt ($this->curl, CURLOPT_POSTFIELDS, $xml); //add the xml data to the Request return $this->curlExecGeneral(); } } ?>

    Read the article

  • .NET client getting "not well formed" XML response from Axis web service

    - by Tex
    I have a simple .NET app that makes a SOAP call to a third party Axis web service. When I trace the HTTP traffic, I see that the Request looks fine, however I'm getting an exception: "Response is not well-formed XML." The return object is null, as it seems the XML can't be deserialized. One question regarding the various namespace declarations inside the wsdl. Several of these declarations point to URLs / domains that no longer exist. Could this cause any problems? From the wsdl document: <wsdl:definitions targetNamespace="http://domaindoesntexist.com/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://domaindoesntexist.com/" xmlns:intf="http://domaindoesntexist.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> A sample HTTP response with incriminating data removed: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Transfer-Encoding: chunked Date: Fri, 05 Jun 2009 13:54:59 GMT 7cb <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <someMethod xmlns="http://test.com/services/myservice/"> </someMethod> </soapenv:Body> </soapenv:Envelope> 0

    Read the article

  • requesting ajax via HttpWebRequest

    - by Sami Abdelgadir Mohammed
    Hi guys: I'm writing a simple application that will download some piece of data from a website then I can use it later for any purpose The following is the request and response copied from Firebug as the browser did that... when u type http://x5.travian.com.sa/ajax.php?f=k7&x=18&y=-186&xx=12&yy=-192 you will get a php file has some data.. But when I make a request with HttpWebRequest I get wrong data (some unknown letters) Can anyone help me in that.. and if I have to make some encodings or what?? I will be so appreciated.. Response Server nginx Date Tue, 04 Jan 2011 23:03:49 GMT Content-Type application/json; charset=UTF-8 Transfer-Encoding chunked Connection keep-alive X-Powered-By PHP/5.2.8 Expires Mon, 26 Jul 1997 05:00:00 GMT Last-Modified Tue, 04 Jan 2011 23:03:49 GMT Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma no-cache Content-Encoding gzip Vary Accept-Encoding Request Host x5.travian.com.sa User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Cookie CAD=57878984%231292375897%230%230%23%230; T3E=%3DImYykTN2EzMmhjO5QTM2QDN2oDM1ITOyoDOxIjM4EDN5ITM6gjO4MDOxIWZyQWMipTZu9metl2ctl2c6MDNxADN6MDNxADNjMDNxADNjMDNxADN; orderby_b1=0; orderby_b=0; orderby2=0; orderby=0

    Read the article

  • Paypal Error - IPN Validation Failed.

    - by user504178
    Hello , I am getting below error. [12/26/2010 5:48 AM] - FAIL: IPN Validation Failed. IPN POST Vars from Paypal: auth=A76zglTH7sCSLAVjZISTEp38SYXWAoNlO1uurxDvnlFy40uy-mlrvqkp_S5q3bFhVBbO2GwpJRvdYDvfQuM0581EYkEITS1SnDzfWV-ju60OZm_VzHsc8o2Q8K7mmZuDs9ANFwW9iIP2Ig8fGPSwZN8APK2PtCMIda28rBnNMJ2FWaeNKgmzTCuG5HnpzLD7ZtTCElp4MC05kyx9Ro-9ggqzVx7OU1zleJ_c1W, form_charset=UTF-8, IPN Response from Paypal Server: HTTP/1.1 200 OK Date: Sun, 26 Dec 2010 10:48:50 GMT Server: Apache Set-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=Ejohjh-kFgFpKAeNiYlgG8LwsLOi5Sir4Ut7tXINWaRmWM2eNXfFkJRQmO09WqBbXWIpXd0ydzrS7JMWO0sHZMg0Wfdd4gt6UcpSswiiUl2EfiP_ykxKJOFOzcjMrn_6xzc8GG%7c5mvwkJOzeFg-vpKR1fovKAVDyvmzI5sFbPatUC6gbf9Wk4Llel4btOJa7uQbYSLhuprHVG%7c537g5xvn4Hns8l-HE1pnyQ2GUAxcSINm-oVJENMuU6yS_bYa4IAw4QlGP-0zq80pjZa5j0%7c1293360531; domain=.paypal.com; path=/ Set-Cookie: cookie_check=yes; expires=Wed, 23-Dec-2020 10:48:51 GMT; domain=.paypal.com; path=/ Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/ Set-Cookie: navlns=0.0; expires=Sat, 21-Dec-2030 10:48:51 GMT; domain=.paypal.com; path=/ Set-Cookie: Apache=10.191.196.11.222161293360530699; path=/; expires=Sat, 12-Nov-04 04:20:34 GMT Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8 7 INVALID 0 Can anyone please let me know whats wrong over here. Regards, Atul

    Read the article

  • Rails3 renders a js.erb template with a text/html content-type instead of text/javascript

    - by Yannis
    Hi, I'm building a new app with 3.0.0.beta3. I simply try to render a js.erb template to an Ajax request for the following action (in publications_controller.rb): def get_pubmed_data entry = Bio::PubMed.query(params[:pmid])# searches PubMed and get entry @publication = Bio::MEDLINE.new(entry) # creates Bio::MEDLINE object from entry text flash[:warning] = "No publication found."if @publication.title.blank? and @publication.authors.blank? and @publication.journal.blank? respond_to do |format| format.js end end Currently, my get_pubmed_data.js.erb template is simply alert('<%= @publication.title %>') The server is responding with the following alert('Evidence for a herpes simplex virus-specific factor controlling the transcription of deoxypyrimidine kinase.') which is perfectly fine except that nothing happen in the browser, probably because the content-type of the response is 'text/html' instead of 'text/javascript' as shown by the response header partially reproduced here: Status 200 Keep-Alive timeout=5, max=100 Connection Keep-Alive Transfer-Encoding chunked Content-Type text/html; charset=utf-8 Is this a bug or am I missing something? Thanks for your help!

    Read the article

  • Parsing HTTP - Bytes.length != String.length

    - by hotzen
    Hello, I consume HTTP via nio.SocketChannel, so I get chunks of data as Array[Byte]. I want to put these chunks into a parser and continue parsing after each chunk has been put. HTTP itself seems to use an ISO8859-Charset but the Payload/Body itself may be arbitrarily encoded: If the HTTP Content-Length specifies X bytes, the UTF8-decoded Body may have much less Characters (1 Character may be represented in UTF8 by 2 bytes, etc). So what is a good parsing strategy to honor an explicitly specified Content-Length and/or a Transfer-Encoding: Chunked which specifies a chunk-length to be honored. append each data-chunk to an mutable.ArrayBuffer[Byte], search for CRLF in the bytes, decode everything from 0 until CRLF to String and match with Regular-Expressions like StatusRegex, HeaderRegex, etc? decode each data-chunk with the proper charset (e.g. iso8859, utf8, etc) and add to StringBuilder. With this solution I am not able to honor any Content-Length or Chunk-Size, but.. do I have to care for it? any other solution... ?

    Read the article

  • Parallel.For Batching

    - by chibacity
    Is there built-in support in the TPL for batching operations? I was recently playing with a routine to carry out character replacement on a character array which required a lookup table i.e. transliteration: for (int i = 0; i < chars.Length; i++) { char replaceChar; if (lookup.TryGetValue(chars[i], out replaceChar)) { chars[i] = replaceChar; } } I could see that this could be trivially parallelized, so jumped in with a first stab which I knew would perform worse as the tasks were too fine-grained: Parallel.For(0, chars.Length, i => { char replaceChar; if (lookup.TryGetValue(chars[i], out replaceChar)) { chars[i] = replaceChar; } }); I then reworked the algorithm to use batching so that the work could be chunked onto different threads in less fine-grained batches. This made use of threads as expected and I got some near linear speed up. I'm sure that there must be built-in support for batching in the TPL. What is the syntax, and how do I use it? const int CharBatch = 100; int charLen = chars.Length; Parallel.For(0, ((charLen / CharBatch) + 1), i => { int batchUpper = ((i + 1) * CharBatch); for (int j = i * CharBatch; j < batchUpper && j < charLen; j++) { char replaceChar; if (lookup.TryGetValue(chars[j], out replaceChar)) { chars[j] = replaceChar; } } });

    Read the article

  • Why Firebug pretends that my stylesheet is calling my xmlrpc ?

    - by Rebol Tutorial
    Firebug shows a request which causes a huge delay to http://reboltutorial.com/wp-content/themes/minaflow/none Details below but I don't understand why it says it comes from xmlrpc and the stylesheet: Date Sun, 04 Apr 2010 16:10:02 GMT Server Apache X-Powered-By PHP/5.2.13 X-Pingback http://reboltutorial.com/xmlrpc.php Expires Wed, 11 Jan 1984 05:00:00 GMT Cache-Control no-cache, must-revalidate, max-age=0 Pragma no-cache Set-Cookie wordpress_test_cookie=WP+Cookie+check; path=/; domain=.reboltutorial.com Last-Modified Sun, 04 Apr 2010 16:10:03 GMT Vary Accept-Encoding Content-Encoding gzip Keep-Alive timeout=2, max=94 Connection Keep-Alive Transfer-Encoding chunked Content-Type text/html; charset=UTF-8 Requêtemise en page impression GET /wp-content/themes/minaflow/none HTTP/1.1 Host: reboltutorial.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2) Gecko/20100115 Firefox/3.6 Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://reboltutorial.com/wp-content/themes/minaflow/style.css Cookie: _csoot=1267966575980; _csuid=4b6f27395991a2ff; wp-settings-1=editor%3Dhtml%26align%3Dleft%26m0%3Do%26m1%3Do%26m2%3Do%26m3%3Dc%26m4%3Do%26m5%3Dc%26m6%3Do%26m7%3Do%26m8%3Dc%26m9%3Dc%26m10%3Dc%26m11%3Do%26m12%3Dc%26m13%3Dc%26m14%3Dc%26m15%3Dc; wp-settings-time-1=1270384700; subscribe_checkbox_=unchecked; PHPSESSID=o70hjpjf7uj2hb4doe4k0o5co5; wordpress_test_cookie=WP+Cookie+check; xumgeqhxmhohxipF=Erjixxeeskfgnlba; SJECT=CKON; wordpress_=admin%7C1271592539%7C392c555d9051c6fa184074d8441cc472; wordpress_logged_in_=admin%7C1271592539%7C0e7a92bda53cc2f5afc32962237a1037; rcBDvgtspmuEsyzp=rmqjtFbCfheGCjBw; prli_click_15=creatingstandard; prli_visitor=m7928r

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >