How to getting custom protocol custom-protocol://some-uri-path to act like http to support page browser?

For example.
custom-protocol://some-uri-path/test.html

I want the test.html works like

http://some-web-site/test.html
That I can navigate in the html page.

0
Yonggang
6/24/2015 11:10:12 AM
mozilla.dev.platform 6619 articles. 0 followers. Post Follow

4 Replies
594 Views

Similar Articles

[PageSpeed] 58

On 6/24/15 1:10 PM, Yonggang Luo wrote:
> For example.
> custom-protocol://some-uri-path/test.html
> 
> I want the test.html works like
> 
> http://some-web-site/test.html
> That I can navigate in the html page.
> 
Check out nsIProtocolHandler

Here is an implementation that directly forwards to http(s):

http://mxr.mozilla.org/comm-central/source/calendar/base/src/calProtocolHandler.js

Philipp
0
Philipp
6/24/2015 11:37:59 AM
=E5=9C=A8 2015=E5=B9=B46=E6=9C=8824=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 UTC=
+8=E4=B8=8B=E5=8D=887:38:01=EF=BC=8CPhilipp Kewisch=E5=86=99=E9=81=93=EF=BC=
=9A
> On 6/24/15 1:10 PM, Yonggang Luo wrote:
> > For example.
> > custom-protocol://some-uri-path/test.html
> >=20
> > I want the test.html works like
> >=20
> > http://some-web-site/test.html
> > That I can navigate in the html page.
> >=20
> Check out nsIProtocolHandler
>=20
> Here is an implementation that directly forwards to http(s):
>=20
> http://mxr.mozilla.org/comm-central/source/calendar/base/src/calProtocolH=
andler.js
>=20
> Philipp

This is forwards to https, but I am forwards to resource://
That's really different.
0
Yonggang
6/24/2015 12:53:00 PM
On Wed, Jun 24, 2015 at 5:53 AM, Yonggang Luo <luoyonggang@gmail.com> wrote=
:

> =E5=9C=A8 2015=E5=B9=B46=E6=9C=8824=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 U=
TC+8=E4=B8=8B=E5=8D=887:38:01=EF=BC=8CPhilipp Kewisch=E5=86=99=E9=81=93=EF=
=BC=9A
> > On 6/24/15 1:10 PM, Yonggang Luo wrote:
> > > For example.
> > > custom-protocol://some-uri-path/test.html
> > >
> > > I want the test.html works like
> > >
> > > http://some-web-site/test.html
> > > That I can navigate in the html page.
> > >
> > Check out nsIProtocolHandler
> >
> > Here is an implementation that directly forwards to http(s):
> >
> >
> http://mxr.mozilla.org/comm-central/source/calendar/base/src/calProtocolH=
andler.js
> >
> > Philipp
>
> This is forwards to https, but I am forwards to resource://
> That's really different.
>

I'm quite sure I already told you about this, but
https://github.com/ncalexan/fennec-bootstrapper includes a bootstrapper://
protocol which does something quite similar: it handles bootstrapper://URI
like URI.  It does some things around privileges that I found necessary to
load http (and resource, I think) schemes in a privileged context.

Nick
0
Nicholas
6/24/2015 11:26:01 PM
2015-06-25 7:26 GMT+08:00 Nicholas Alexander <nalexander@mozilla.com>:
>
>
> On Wed, Jun 24, 2015 at 5:53 AM, Yonggang Luo <luoyonggang@gmail.com> wro=
te:
>>
>> =E5=9C=A8 2015=E5=B9=B46=E6=9C=8824=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 =
UTC+8=E4=B8=8B=E5=8D=887:38:01=EF=BC=8CPhilipp Kewisch=E5=86=99=E9=81=93=EF=
=BC=9A
>> > On 6/24/15 1:10 PM, Yonggang Luo wrote:
>> > > For example.
>> > > custom-protocol://some-uri-path/test.html
>> > >
>> > > I want the test.html works like
>> > >
>> > > http://some-web-site/test.html
>> > > That I can navigate in the html page.
>> > >
>> > Check out nsIProtocolHandler
>> >
>> > Here is an implementation that directly forwards to http(s):
>> >
>> >
>> > http://mxr.mozilla.org/comm-central/source/calendar/base/src/calProtoc=
olHandler.js
>> >
>> > Philipp
>>
>> This is forwards to https, but I am forwards to resource://
>> That's really different.
>
>
> I'm quite sure I already told you about this, but
> https://github.com/ncalexan/fennec-bootstrapper includes a bootstrapper:/=
/
> protocol which does something quite similar: it handles bootstrapper://UR=
I
> like URI.  It does some things around privileges that I found necessary t=
o
> load http (and resource, I think) schemes in a privileged context.
Yes, I've already done that, but resource is totally different from
http when I running


To getting resource act like http, we need do preferences work to
getting the bootstrap URI can load internally

pref("network.protocol-handler.expose.bootstrap", true);

>
> Nick



--=20
         =E6=AD=A4=E8=87=B4
=E7=A4=BC
=E7=BD=97=E5=8B=87=E5=88=9A
Yours
    sincerely,
Yonggang Luo
0
UTF
6/25/2015 3:41:18 AM
Reply:

Similar Artilces:

Implement security in web service that supports soap, HTTP-POST, HTTP-GET protocols
 I am writing a webservice that supports soap, HTTP-POST, HTTP-GET protocols by enabling the post and get in web.config file.Now I want to implement security, ie client have to send the username and password for authorization. I know how to implement security by usingsoap headers, but I think this will not work for HTTP-POST and HTTP-GET. Client can you use any protocol that satisfies his requirement. Can someone please explain how to implement security to all the protocols. Thank you You need to implement transport-level security. In .Net 2.0 I think this can only be don...

custom protocols
Can my extension set it's own protocol? For example, say I wanted to have my error page be displayed with this url: myapp:error?page=home I see that Firefox uses the following format for their blocked sites page: about:blocked?e=error_code&u=url (I'd even be fine with doing about:myapp too) I also found this page on MDC but it seems to be more for webpages not content loaded in chrome: https://developer.mozilla.org/en/Web-based_protocol_handlers On 2 =D3=C5=CE, 05:53, isnw <n...@summitsix.com> wrote: > Can my extension set it's own prot...

Custom protocols
Hello there, Not sure if this is the right group for this, but then I dont know any other. ===== I've added a custom url protocol to windows registery and when clicking on it in IE it launches my program perfectly. However whenever I click on it in Firefox, a message box pops up saying an application is needed to handle this protocol and gives no name. mailto: ftp: etc all work fine so the question is how do I get firefox to trust my protocol like mailto: is ? Regards Anthoni Anthoni Gardner wrote: > Hello there, > > Not sure if this is the right grou...

how to get the path of page which contain the custom control?
When I drag a custom control onto aspx page, I have written a UIEditor class to edit property of my custom control, but how to get the path of aspx when I open the UIEditor form? I have tried many ways, but still have no idea.  Please help me... If you mean "UITypeEditor" class, it is designed to be used only from the Properties Editor. The design mode application (VS.NET, WebMatrix, etc) locates the correct type from the [Editor()] attribute associated with a specific property. The PropertiesEditor uses that UITypeEditor object to build the UI and already has an instance of the web ...

How to get custom paging like the one in this forum
I need somebody to point me in the right direction to create a usercontrol that has custom paging to apply to my gridviews that looks exactly like the one used for this forum at the bottom:  Page 1 of 2003 (40059 items) 1 2 3 4 5 Next > ... Last ยป I am looking for C# code and is it possible to accomplish this using the objectdatasource object? Thanks  Well, I had to come up with a custom paging plan since I was using repeaters that don't have paging built in..Here is an example of how I did that.. Maybe this will lead you in the right direction.In th...

Getting Custom Browser Name from Web pages
A customer has written a windows ,net application (for a name lets call it MyOwnBrowser) that serves as the browser for their intranet web sites.  As a precaution, they want to have the web pages for their internal web applications make sure that the browser being used to view the web pages is MyOwnBrowser.  In previous web apps that I've written, I've included a test in the Session_Start event to determine what browser is being used. The code to get the browser name is Dim BrowserName As String = Request.Browser.Browser Unfortunately, this doesn't work in th...

Custom Module with custom pages?
Hi, I am new with DotNetNuke and would like to add asp.net-pages I developed myself. These pages have their own functions and structure. I tried to do this with a custom module unfortunately with no result. Of course I could add a custom module and edit the content of this module. But this is not what I want to do. Is there any way to add my pages in DNN? If yes how?   Maybe I can create these pages directly in DNN again but there are a few questions / problems I see: 1. The website has to export some data in xml and a local application has to read this data directl...

How to get POST data which using custom protocol handler C++
I have implemented a custom protocol handler. Now i am trying to get the POST data when a post request is made to my custom protocol. So far i have nsiProtocolHandler::NewChannel in which i changed the scheme of the uri from custom to "https" and created new channel. In my channel i have implemented nsiUploadChannel::SetUploadStream(...) . But SetUploadStream never gets called. My understanding is that nsiInputstream in SetUploadStream will have the POST data. ...

How to create custom properties for aspx page which should refelect in design time properties window itself.( as like as custom server control).
Hi. I need to create the custom properties for aspx page itself where those custom properties should refelet in the properties window at the design time as like as other custom server controls. I tried pageBase class which will have cusom properties for page and inherited that pageBase to my aspx page . But its refelecting the code  behind file not in design time. I need to accss those aspx page custom properties at the design time itself in properties window as like as other custom server control.I appriciate your help. [FYI: my scenerio is customer ...

Custom JS class gets "Object doesn't support this property or method" when invoking custom event handler.
I'm creating a custom keyboard handler and want to raise events for specific keys.  I've created an enumeration for the function keys and a class that registers to the document's onkeydown event using $addHandler.  This event is handled just fine.  I've modeled my JS code on the behavior code from the ASP.Net Ajax Toolkit, so I expect it to work as reliably.  Unfortunately, when I call handler(this, eventArgs) I get the error in the $addHandler function of all places.  Here's the problematic code: // Copyright 2009, HCA// Written by Payton Byrd/...

Get Previous Page URL for Custom Error Page
In my global.asax, I catch all errors and redirect to a custom error page.  On that custom error page, I want to retrieve the URL of the page the error occurred on.  I try Request.UrlReferrer but that's alway nothing.  Beside storing the url in session, what else can I do? Hello:Have you tried the following in your Global.asax file?Request.PathNeed ASP.NET web hosting? Private Message me for a free quote. A common approach is to pass the URL of the page where the error occured to the error page through the querystring. For example, by default ASP.NET redirects user...

nsScriptSecurityManager and a custom protocol
Hi, Apologies if this is a novice question... I am stuck with the following problem: there is an application (it used to be based on Mozilla-1.7 platform and I am trying to "upgrade" it to mozilla-1.9.1, I am using firefox-3.1b2 release). I have more or less got it compiling and "almost working" but there is one big issue which seems to be a blocker for now, namely the security policy which wasn't there for 1.7. In my case, it boils down to the following: there are some resources on the client side (either in the form of file://foo.html or in the form o...

custom protocol handler
How can I define a custom protocol handler in Thunderbird to call an external program when a specially formatted link is clicked in an HTML email? I generate some HTML reports that are emailed. I want to have clickable links in the reports that will take various actions on a web server without opening a browser. My thought was to create a link like abcd://localhost:9999/do_something so that when user clicks the link it will call the external program which can do whatever I want (like a wget to call the webserver). So I need to somehow tell Thunderbird to call a specific exter...

custom protocol handler
How can I define a custom protocol handler in Thunderbird to call an external program when a specially formatted link is clicked in an HTML email? I generate some HTML reports that are emailed. I want to have clickable links in the reports that will take various actions on a web server without opening a browser. My thought was to create a link like abcd://localhost:9999:/do_something so that when user clicks the link it will call the external program which can do whatever I want (like a wget to call the webserver). So I need to somehow tell Thunderbird to call a specific exte...

Web resources about - How to getting custom protocol custom-protocol://some-uri-path to act like http to support page browser? - mozilla.dev.platform

Resources last updated: 1/21/2016 9:32:11 AM