w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why 505 Http Version Not Supported on public WiFi?
Usually, the problem is because of a network proxy being used by the public WiFi provider. There are known bugs in the Squid 2.x series, for example, which may be converting HTTP 1.1 requests to HTTP 1.0. We had a similar problem with talking to Azure through a Squid proxy. Your workaround of switching to HTTPS is the recommended one.

Categories : Http

How to send an image from HTTP client to http server listening on this URL(http://localhost:8000/test)
Are you using web container like apache/nginx or one you write it yourself? If you are wondering how to decode the tcp packet in your own server, just upload a file to a server and grasp the http packet to see the detail of the protocol

Categories : Misc

HTTP protocol not supported in WebRequest under mono
The WebRequest.GetCreateor gets its list of supported protocols from app.config/machine.config, specifically, the configuration section system.net/webRequestModules. If the protocol (in your case "http") isn't found there, it throws your NotSupportedException. So, check your machine.config, it's probably missing the correct webRequestModules. It should have "http" -> HttpRequestCreator. Or, try calling the private constructor of HttpWebRequest through reflection, if all else fails.

Categories : C#

Calling https version of TYPO3: content (css, js, ..) is blocked because link to http version
I used config { baseURL = https://domain.com } and adapted all links which had a http in the beginning (otherwise the slider stopped working because Chrome didn't load the other ressources ...). Seems to work now.

Categories : Http

"Cross origin are only supported for HTTP" and "DOMException.NETWORK_ERR 19"
Depending on which browser you're using, it might be an expected behaviour. Pretty much all browsers, given a local file path, try to open the file via file:// protocol. I know that WebKit treats the file:// protocol as unsafe (i.e. you can't make the AJAX requests to this protocol regardless of where the file actually is). Gecko allowed you for subdirectories last time I checked and I'm not sure about IE The best solution would be to access the files via http://localhost instead, as behaviour of HTTP protocol is much more reliable. Both in your JS code and when you open the page in the browser.

Categories : HTML

is meta http-equiv value cache control is not supported?
The <meta http-equiv> tags are only used when the HTML file in question is been opened from a non-HTTP resource such as local disk file system (via file:// URI) and not when the HTML file in question is been opened from a real HTTP resource (via http:// URI). Instead, the real HTTP response headers as set via HttpServletResponse#setHeader() are been used. So, your concrete problem is caused because those <meta http-equiv> tags are ignored. See also: Making sure a web page is not cached, across all browsers Avoid back button on JSF web application

Categories : Java

Wrong version of System.Net.Http on build server
It is now fixed. I have done the following things - 1 - Specify the version in the assemblies. <system.web> <compilation debug="true" targetFramework="4.5"> <assemblies> <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </assemblies> </compilation> 2 - Set 'copy local' to true for System.Net.Http 3 - Copy the System.Net.Http.dll v4 into the project directory - thanks Aevitas. Very sorry if this does not help anyone with seemingly the same issue. I had to made a lot of little changes and may not have remembered them all. Thanks

Categories : C#

htaccess to rewrite all HTTPS requests to HTTP version
You're using capture group # 1 i.e. $1 without using capturing a group using square brackets. Change your code to this: RewriteCond %{HTTPS} on RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]

Categories : Htaccess

Google Drive SDK System.Net.Http.Primitives Version 1.5.0.0 instead of 2.1.10.0
Please follow our instructions in the Build wiki page. I recommend you to use NuGet to get the 3rd party packages (including Microsoft.Net.Http package)

Categories : C#

Use JMeter HTTP Proxy to record JSON over HTTP request from not-a-browser client
You can see my question and the answer I got below: Use Jmeter proxy to record HTTP calls from iOS simulator In short: With this tutorial you can record calls from your Android device: http://blazemeter.com/blog/load-testing-mobile-apps-made-easy For make same thing with iPhone, do the following steps: Mac configuration: system preferences -> Network -> Advanced.. -> Proxies -> check "Web Proxy (HTTP) ->in "Web Proxy Server" field, type your IP (http://www.wikihow.com/Find-Your-IP-Address-on-a-Mac), and choose available port (I using 8080) ->ok -> Apply iPhone configuration: Settings -> WiFi -> choose same wifi you use with your Mac -> press on it again to go to it's details -> scroll down ->In HTTP proxy, choose Manual -> server = your mac IP you found earlier -> port = the port yo

Categories : Http

Blackberry 10: How to correspond incoming http replies to their previous http request counterparts?
You have at least two ways to do this: From the QNetworkReply, you can access to your original request (https://developer.blackberry.com/cascades/reference/qnetworkreply.html#request), on which you can set an originatingObject: https://developer.blackberry.com/cascades/reference/qnetworkrequest.html#setOriginatingObject, and any other attribute on your request You can check against the content URL: https://developer.blackberry.com/cascades/reference/qnetworkreply.html#url

Categories : C++

Is it reasonable to assume that all HTTP headers (of a single HTTP message) arrive in the same SSL/TLS record?
No, cookies alone could be well above 16K. According to RFC2109 and IE implementation for cookie limits the recommended minimum restriction on cookie size per domain is 80K RFC 2109 section "6.3 Implementation Limits": at least 4096 bytes per cookie (as measured by the size of the characters that comprise the cookie non-terminal in the syntax description of the Set-Cookie header) at least 20 cookies per unique host or domain name

Categories : C

Writing a custom http server, does supporting AJAX require extra code over HTTP GET?
AJAX is fine, it's just GET (or occasionally POST) requests which are formatted exactly the same on the server side. The difference on the server is, they'll typically go to a different "servlet" (or method in your C code) to be answered. Typically, the answer may be XML, JSON (serialized data for Javascript) or perhaps an HTML fragment (without or tags, just the content of a or something.). Or it could just be a 200 OO response indicating "success". On the browser side, AJAX is requested & used from Javascript within a page; with the results then either pasted into the DOM via innerHtml (for HTML fragments), or built into the DOM via Javascript (for JSON). The second option is less performant. Your first typical use-case might well be an autocomplete for a search-box, or somet

Categories : C

Text FIle - Access forbidden through http://localhost but OK if accessed http://private-ip ( LAMP )
Solved - looks like this was due to me keeping the doc root in a folder under /home. Once i switched that back to the /srv/www/htdocs folder , everything was ok. I made no other changes in the httpd.conf. - App/My work has been stable for a few weeks already

Categories : PHP

Configure IIS Windows Authentication to return HTTP 403 instead of HTTP 401 for permission denied with an authenticated user
What did not work I tried just about every IIS configuration permutation with no luck. I goofed around with the Windows authentication provider settings, like NTLM, Negotiate, and Negotiate:Kerberos. None of them seemed to do the trick. This isn't too much of a surprise since the browsers are deciding to try authentication again, even though they probably shouldn't. 401 Unauthorized The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refu

Categories : Asp Net

"This version is not supported. only servers up to microsoft sql server 2005 are supported"
As Visual Studio 2008 was released before SQL Server 2008, the development environment database tools were coded without knowing about SQL Server 2008. However, since these versions of Visual Studio were released before SQL Server 2008, the design-time tools cannot interact with SQL Server 2008 - even though it is possible to programmatically access the data in a SQL Server 2008 database from applications written with Visual Studio 2008 or 2005 Source: Connecting to Microsoft SQL Server 2008 from Microsoft Visual Studio 2005 and 2008 Luckily, Microsoft did release a patch for both Visual Studio 2005 and Visual Studio 2008, which is also referenced in the article (to save you reading the whole thing, for Visual Studio 2008, you need to install Visual Studio 2008 Service Pack

Categories : Sql Server

Why does $_SERVER["SERVER_PROTOCOL"] show HTTP/1.0 when the client spoke HTTP/1.1
Interesting problem! You have two connections here because you have a end-point proxy in between. The request from your version of nginx to apache is going over HTTP 1.0. CLIENT <---- (HTTP 1.1) ----> NGINX <----- (HTTP 1.0) ----> SERVER Nginx 1.1.4 onwards supports HTTP 1.1 to upstream servers.

Categories : PHP

Extracting elements from an HTTP XML response--HTTP Client & Java
Instead of trying to extract the value with string manipulation, try to use Java's inbuilt ability to parse XML. That's a much better approach. Http Components returns responses in an XML format - there's a reason for that. :) Here's probably one way to solve your problem: // Parse the response using DocumentBuilder so you can get at elements easily DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse(response); Element root = doc.getDocumentElement(); // Now let's say you have not one, but 'n' nodes that contain the value // you're looking for. Use NodeList to get a list of all those nodes and just // pull out the tag/attrib

Categories : Java

HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable
503 means the functions are working and you're getting a response from the remote server denying you. If you ever tried to cURL google results the same thing happens, because they can detect the user-agent used by file_get_contents and cURL and as a result block those user agents. It's also possible that the server you're accessing from also has it's IP address blackballed for such practices. Mainly three common reasons why the commands wouldn't work just like the browser in a remote situation. 1) The default USER-AGENT has been blocked. 2) Your server's IP block has been blocked. 3) Remote host has a proxy detection.

Categories : PHP

Python HTTP request with controlled ordering of HTTP headers
You can try to use the OrderedDict class to store the headers, instead of request's default one: >>> from collections import OrderedDict >>> from requests import Session >>> s = Session() >>> s.headers CaseInsensitiveDict({'Accept-Encoding': ... 'User-Agent': ... 'Accept': '*/*'}) >>> s.headers = OrderedDict([('User-Agent', 'foo-bar'), ('Accept', 'nothing')]) >>> s.headers OrderedDict([('User-Agent', 'foo-bar'), ('Accept', 'nothing')])

Categories : Python

sun.net.www.protocol.http.HttpURLConnection - when will support http method PATCH?
The JDK HttpURLConnection doesn't support the HTTP PATCH method in JDK6, JDK7 nor JDK8. No official JDK roadmap shows this item for the moment. You can use Apache HTTPClient 4.2+ or AsyncHTTPClient.

Categories : Misc

getting java.io.IOException: HTTP request failed, HTTP status: 404 in ksoap2 while passing xml data to soap1.2 android
Try the below PropertyInfo req = new PropertyInfo(); req.name="silent"; req.type=String.class; req.setValue("<silent>" +"<action>"+logon+"</action>" +"<gameid>"+mygameid+"</gameid>" +"<gpassword>"+mypwd+"</gpassword>" +"<data>" +"<username>"+test@test.com+"</username>" +"<password>"+test+"</password>" +"</data>" +"</silent>"); request.addProperty(req);

Categories : Android

C HTTP Server & OpenSSL - Works fine for HTTP - Multiple/rapid/concurrent connections being dropped using HTTPS
You should call SSL_accept() in your request handling thread. This will allow your listening thread to process the TCP accept/listen queue more quickly, and reduce the chance of new connections getting a RESET from the TCP stack because of a full accept/listen queue. SSL handshake is compute intensive. I would guess that your spammer is probably not using SSL session cache, so this causes your server to use the maximum amount of CPU. This will cause it to be CPU starved in regards to servicing the other connections, or new incoming connections.

Categories : C

Htaccess redirects http://www... to https://www..., but does not redirect http://www
Try this: RewriteEngine On #not https RewriteCond %{HTTPS} off RewriteRule .* https://www.metalmetalland.com%{REQUEST_URI} [R=301,L] #https, but not www RewriteCond %{HTTP_HOST} !^www. RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Categories : Apache

Get http 500 in a Azure worker role http request
One thought is that when you run your code in the cloud, you are running on their servers, meaning you dates could all be out of whack. I have seen it before where you assume DateTime.Now (or whatever you are doing) is your time, but its actually the server time of the VM you are running on in the cloud. The reason it could be a date issue is that I see you are passing in date parameters to the URL, perhaps they are formatted wrong when you are running in the cloud?

Categories : C#

Which should be used when naming a variable in Objective C, "http" or "HTTP" prefix?
Honestly, it doesn't really matter. Rather than being worried about naming, you should make sure everything is clear and well spaced. Unless you have a name that is really similar or close to a class or method name, you should not worry about it. This is mainly a personal choice. Do whatever you want. Just make sure you can read it. |˙∆˙|/

Categories : Objective C

handling $http.get and $http.post errors in Angularjs
Response interceptors are attached during the config phase of an angularjs app. You can use them to globally respond to any $http request. Be aware, template files also use $http request, so you may wish to filter some requests in your interceptor to only the ones you wish to respond to. A good understanding of the promises pattern is needed to successfully use response interceptors. Heres an example of how they are used: angular.module('services') .config(function($httpProvider){ //Here we're adding our interceptor. $httpProvider.responseInterceptors.push('globalInterceptor'); }) //Here we define our interceptor .factory('globalInterceptor', function($q){ //When the interceptor runs, it is passed a promise object return function(promise){

Categories : Angularjs

Angular JS cancel $http call before calling a new $http
You need to create a new canceler for each request, because once it's resolved it can't be used again. See here for an updated plnkr.

Categories : Http

How to parse http Get request body in a Go http server?
Most of the magic happens in transfer.go. Here's what I found that looks relevant in the fixLength func: if !isResponse && requestMethod == "GET" { // RFC 2616 doesn't explicitly permit nor forbid an // entity-body on a GET request so we permit one if // declared, but we default to 0 here (not -1 below) // if there's no mention of a body. return 0, nil } Looks like, as long as your client is ending a Content-Length header, you're all good. If not, the library will assume there's no body on a GET request. You're kind of off the edge of the map as your client is doing some pretty unusual/broken stuff. If you can fix the client, that's your best bet. That said, if you have a client you need to support that's doing this wrong, you're going to have to roll so

Categories : Http

HTTP status 401, but expected data in HTTP response
I don't think the entity could theoretically be the data that would be sent to an authorized request. From RFC 2616: If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. So it's legal to present entity to a unauthenticated user. As you said, authorized data should not be returned to a client... but in your case, the entities are just both the same for authenticated and unauthenticated users. On the other hand, Google's login page uses 200 as the response code for failing to authenticate. Note that: the response MUST include a WWW-Authenticate hea

Categories : Http

Append Application(Andriod/Iphone/Windows) version in HTTP Request?
Here is an example for an android client. First you need to get the version from your app. Here is an exemple with the version name (you can also recover the version code if needed). String vName = null; try{ vName = getPackageManager().getPackageInfo(getPackageName(),0).versionName; } catch(NameNotFoundException e){ } Then just add your version to http header when you request your server from the client app. HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("https://myserver.com/postrequest"); if(vName != null){ httppost.addHeader("ClientAppVersion", vName); } ...

Categories : Android

turn http post request to http get
You should not do this as the semantics are different. GET requests are designed to be cached (i.e. usually static stuff). POST on the other hand is more dynamic and is not cached. You are very likely to get undesired behaviour if you do this.

Categories : Java

http:// vs http://www: Should I use subdomain or permanent redirect
Yes, if it is the same content, then give it a single URI; and redirect example.com -> www.example.com not the other way around (www. is the convention and is where systems will most likely look first). If you host on both urls, then Spiders and other bots may be smart enough to realize that it is the same, but why rely on it when a simple redirect ensures they know? This also means a slightly simple web server setup (only hosting a single domain) and will be easier down the road if you do things like enable ssl or load balancing. The only (arguable) downside to redirects is that it will mean an additional http request if the user gets it wrong.

Categories : Http

htaccess rewrite all using http:// or http://www. to https except for one or two URI
Move the rewrite condition to the part where http: is ON not where https: is already ON. RewriteCond %{HTTPS} !=on RewriteCond %{REQUEST_URI} !^/folder/next_folder/custom_id RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www.(.*)$ RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Categories : Htaccess

The database cannot be opened because it is version 706. This server supports version 655 and earlier. A downgrade path is not supported
Version 706 is a database file from Sql Server 2012 Version 665 is a database file from Sql Server 2008R2 (post SP1 ?) http://conceptdev.blogspot.com/2009/04/mdf-cannot-be-opened-because-it-is.html

Categories : C#

WordPress Site Error failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
To make the path request local and not over the network I had to use the WordPress template tag get_template_directory() instead of get_bloginfo('stylesheet_directory') .

Categories : Wordpress

Difference between XML Over HTTP & SOAP Over HTTP
SOAP is a specialization of XML, as it has a schema, such as http://www.xmlsoap.org/soap/envelope/, whereas XML is more general. For using GET, you can read through this discussion: http://www.coderanch.com/t/463869/Web-Services/java/SOAP-request-HTTP, but basically SOAP is done via POST, though Axis2 appears to have support for GET, as a way to have SOAP work in a world where REST seems to rule. And, according to this IBM article (http://www.ibm.com/developerworks/xml/library/x-tipgetr/index.html) SOAP 1.2 introduces GET. As you mentioned, SOAP is a standard, so there are tools that can easily work with it, including dynamic client generation, as shown in this question, dynamic proxy soap web service client in java?, whansere the client generates the stubs needed upon connection. If y

Categories : Web Services

Exception DATABASE1.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported
Generally you get this when your database has been updated to a newer version of SQL Server than the server you are trying to attach it from. For instance if your database was upgraded from SQL Server 2005 to SQL Server 2008, you would no longer be able to open that database on SQL Server 2005. The "downgrade path is not supported" message implies that you can't open the newer database on an older SQL Server version. Suggestions: Upgrade the version of SQL Server (not visual studio, but your SQL Server version). or Open this database on a server with a newer version of SQL Server, then script out the entire database and reload it into your server. Either of these should get it working for your. I hope this helps!

Categories : C#

apache http client org.apache.http.NoHttpResponseException: The target server failed to respond
Check if your "URL" has correct value. Error message says "The target server failed to respond". That's either your provided URL has wrong or server has shut down. If you provided wrong parameter name/value or something, error message would be different.

Categories : Java

YouTube Data API failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
is file_get_contents supported on your web server? many web servers dont support this function due to security risks. have you looked into using curl instead? maybe something like this: $option = array( 'part' => 'snippet', 'q' => 'search_query', 'type' => 'video', 'key' => 'your_key' ); $url = "https://www.googleapis.com/youtube/v3/search?".http_build_query($option, 'a', '&'); $curl = curl_init($url); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_HTTPHEADER, false); $json_response = curl_exec($curl); curl_close($curl); $responseObj = json_decode($json_response);

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.