CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of http
$(document).ready(function () {
    if (window.location.protocol == 'https:') {
        $("a[href^='http:\/\/" + window.location.hostname + "']").each(function() { 
               this.href = this.href.replace(/^http:/i, "https:");
           });
    };
});
by Javier Callico   January 24, 2012 @ 7:27am
18 Views
no comments
 
XML
<configuration>
<httpHandlers>
   <add verb="*" path="*.jsp" type="HinoCentral.Website.AppCode.JSPHandler"/>
   <add verb="*" path="*.jspf" type="HinoCentral.Website.AppCode.JSPHandler"/>
</httpHandlers>
<system.webServer>
    <handlers>
      <add name="JSPHandler_jsp"  path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
      <add name="JSPHandler_jspf" path="*.jspf" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
    </handlers>
by Egli   October 25, 2011 @ 2:36pm
60 Views
no comments
 
C#
IServiceProvider provider = (IServiceProvider)HttpContext.Current.Context;
HttpWorkerRequest worker = (HttpWorkerRequest)provider.GetService(typeof(HttpWorkerRequest)); 
 
by Rick Strahl   November 08, 2009 @ 4:26pm
416 Views
no comments
 
C++
#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <cstring>
using namespace std;
 
#define MAXRANGE 16843
#define MAXN 110
#define MAXNAMELEN 100
152 Views
no comments
 
C#
public static string SiteUrl()
{
    char[] somesymbols = { '~', '/' };
    string Port = HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
    if (Port == null || Port == "80" || Port == "443")
        Port = "";
    else
        Port = ":" + Port;
    string Protocol = HttpContext.Current.Request.ServerVariables["SERVER_PORT_SECURE"];
    if (Protocol == null || Protocol == "0")
by LukCAD   July 15, 2009 @ 9:25pm
145 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate