On Fri, 2008-10-10 at 11:48 -0400, Paul Mossman wrote:
>
> Scott wrote:
> > On Fri, 2008-10-10 at 10:14 -0400, Paul Mossman wrote:
> > > Hi all,
> > >
> > > Could the SIP Trace installer be create a file association,
> > when run
> > > on a Windows machine?
> > >
> > > On my machine I've manually created a file association
> > ".str" to the
> > > SIP Trace tool, and tweaked my local Interop server to yield Trace
> > > files with a ".str" extension. It works well, I can launch
> > SIP Trace
> > > right from my web browser when downloading a Trace file,
> > and also by
> > > double-clicking on a local trace file.
> > >
> > > It would be very useful to implement this for the Interop site:
> > > http://interop.sipxecs.org/trace.cgi
> >
> > It would be more robust to create a private mime type for the
> > sipviewer files and then modify the trace.cgi script to
> > return that as the Content-Type of the xml file. Then
> > creating the association uses the mime type rather than a
> > suffix that might collide with other things.
>
> I see. But, that wouldn't work when double-clicking on an already
> downloaded SIP Trace file, would it? (i.e. Outside of a web browser.)
I've tweaked interop.sipxecs.org to generate files with MIME type
text/vnd.sipx.siptrace+xml and extension .siptrace. (I picked a long
extension name to avoid colliding with any extensions that are now used.
Windows has been handling long extensions for 10 years, and other
systems even longer, so I don't think we need to pick just 3 letters.)
It seems to do what we want with Firefox on Linux, anyway.
This change is really simple:
Index: http_rootdir/trace.cgi
===================================================================
--- http_rootdir/trace.cgi (revision 13581)
+++ http_rootdir/trace.cgi (working copy)
@@ -34,8 +34,8 @@
if ( $status == 0 )
{
# normal exit, so get the output trace file
- print $query->header(-type=>'text/xml',
- -attachment=>'trace.xml'
+ print $query->header(-type=>'text/vnd.sipx.siptrace+xml',
+ -attachment=>'trace.siptrace'
);
open(TRACE, "<$outfilename");
print <TRACE>;
Dale
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev