view diff is broken? - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: General (https://forums.ldraw.org/forum-12.html) +--- Forum: Help (https://forums.ldraw.org/forum-13.html) +--- Thread: view diff is broken? (/thread-6754.html) |
view diff is broken? - Matthew W. Noel - 2012-11-12 On the parts tracker whenever I click on "view diff" my browser (Google Chrome) downloads a file called "ptdatdiff.cgi" which i can't open. I know chrome is compatible with .CGIs because it had to use ptdetail.cgi to get to the "view diff" link. Anybody know why this might be happening? Re: view diff is broken? - Steffen - 2012-11-12 Firefox has the same problem. The contents of the downloaded file is a concatenation of the two files to be compared. Here's a link to the function: http://www.ldraw.org/library/tracker/tools/ Click on "DAT Diff". Re: view diff is broken? - Matthew W. Noel - 2012-11-13 still does the same thing. whenever I click go it downloads ptdatdiff.cgi. Re: view diff is broken? - Chris Dee - 2012-11-13 Do you have a default program a assigned to .cgi files? I don't and when I download I'm prompted for the program to use and can choose, for example, LDView. It should be fixable, but I'm unlikely to have time to look at it this week. Re: view diff is broken? - Michael Heidemann - 2012-11-13 Yes, that is correct. Please download that file (ptdatdiff.cgi) and open it with LDView. The content of the file **is** the comparison! LDView will not open directly, like PDF files with Acrobat Reader will do! Re: view diff is broken? - Michael Heidemann - 2012-11-13 I have found the following on this (http://www.tek-tips.com/viewthread.cfm?qid=1175419) page: Code: CGI programs can return a myriad of document types. Maybe this helps us to improve that tool. Re: view diff is broken? - Matthew W. Noel - 2012-11-14 that makes more sense now, though perhaps that should be made more apparent on the parts tracker. Re: view diff is broken? - Steffen - 2012-11-14 Chris, I think the solution is very simple. You just need to make sure that the HTTP header sent in the response from the server states the proper MIME type for LDRAW files. The element you need to send back to the client is the "Content-Type" field in the HTTP response header. The user can then associate a tool with that MIME type. As "LDRAW" is of course not part of the official MIME standard, we need to use the "x-" prefix for unofficial file types. Probably application/x-ldraw or model/x-ldraw would be something good IMHO. Alternatively, you could make the URL "appear" as an *.ldr file (instead of *.cgi), so users might, alternatively to the MIME type, use their normal file associations for opening the result file. Since the result - as far as I can see - is a mix of both the old and the new version of the file, probably either *.mpd or *.ldr would be a good file extension to pick; not *.dat Re: view diff is broken? - Chris Dee - 2012-11-14 Yes, aware of that. An unofficial MIME type of application/x-multi-part-ldraw has been defined in the past for MPD files. Re: view diff is broken? - Chris Dee - 2012-11-14 I just checked and ptdatdiff.cgi does set the response header content type to application/x-ldraw. At least that's what the code does and that's what Firebug sees. Re: view diff is broken? - Steffen - 2012-11-15 Ah, thanks for checking. In the meantime I have discovered here what had caused the behaviour for me in Firefox: In Firefox you can configure what shall happen with what filetypes, and I had set "LDRAW Part" to "Save", because this is the only thing I want to do when working with files from the PT. Thus, the saving of the DIFF result was in fact a proof that the LDRAW server sent the proper information. Re: view diff is broken? - Michael Heidemann - 2012-11-16 Where can you set that in Firefox? I only know the "Einstellungen" and there the tab "Anwendungen". But in that list there is no x-ldraw type or any similar entry. Also I can not add a new mime type! Please help. Re: view diff is broken? - Steffen - 2012-11-17 see here http://kb.mozillazine.org/File_types_and_download_actions http://kb.mozillazine.org/MimeTypes.rdf http://serverfault.com/questions/19098/how-can-i-get-firefox-to-display-mime-types-in-browser Re: view diff is broken? - Michael Heidemann - 2012-11-17 Thanks Steffen, that should exactly be what I need. But now I see that in Thunderbird x-ldraw is already set. Code: <RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-ldraw" But this is not shown in Firefox!? Because it seems to work for your in Firefox as well, can you please share your entry, so I do not need to read through all that stuff ? Just found another entry: Code: <RDF:Description RDF:about="urn:mimetype:handler:application/x-ldraw" And another one: Code: <RDF:Description RDF:about="urn:mimetype:application/x-ldraw" Re: view diff is broken? - Michael Heidemann - 2012-11-17 Thanks Steffen, that should exactly be what I need. But now I see that in Thunderbird x-ldraw is already set. <RDFescription RDF:about="urn:mimetype:externalApplication:application/x-ldraw" NC:prettyName="LDView.exe" NC:path="E:\LDraw\Apps\LDview\LDView.exe" /> But this is not shown in Firefox!? Because it seems to work for your in Firefox as well, can you please share your entry, so I do not need to read through all that stuff ? Just found a second entry: <RDFescription RDF:about="urn:mimetype:handler:application/x-ldraw" NC:handleInternal="false" NC:alwaysAsk="false" NC:useSystemDefault="false" NCaveToDisk="true"> <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-ldraw"/> </RDFescription> |