Isn't the main thing we need to test whether text/plain that looks like
text/html will be rendered as such?

On Sat, Nov 04, 2006 at 04:10:08PM +0000, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2006-11-04 16:10:00 +0000 (Sat, 04 Nov 2006)
> New Revision: 10815
> 
> Modified:
>    trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java
> Log:
> Fix the MIME handling test ... it needs to be reviewed and tested; I'm not 
> sure it works
> 
> Modified: trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java
> ===================================================================
> --- trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java    
> 2006-11-04 15:28:42 UTC (rev 10814)
> +++ trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java    
> 2006-11-04 16:10:00 UTC (rev 10815)
> @@ -171,7 +171,7 @@
>               "p6SyMBerNExCLLfkssv4oBTIycX6uWceedQhRx1dXqGlzZCoaccegeoDb/Of" +
>               "lLzEM0899+SzTz9pdCRQQQclNNBIInGEEUYSVURRRxVRJFFEC6VU0EH+xDRT" +
>               "TTfltFP4CgA1VFFFraqAAAIANUIAYJzwRFRHhRVWT2eltVZbb8U1V1135bVX" +
> -             "X38FNlhhhyW2WGOPRTZZZbEMCAA7";
> +             "X38FNlhhhyW2WGOPRTZZZbEMCAA7====";
>       
>       public void handleGet(URI uri, ToadletContext ctx) throws 
> ToadletContextClosedException, IOException {
>               final boolean advancedEnabled = core.isAdvancedDarknetEnabled();
> @@ -179,6 +179,10 @@
>               
>               // Yes, we need that in order to test the browser (number of 
> connections per server)
>               if (request.isParameterSet("wontload")) return;
> +             else if (request.isParameterSet("mimeTest")){
> +                     this.writeReply(ctx, 200, "text/html", "OK", 
> imgWarningMime);
> +                     return;         
> +             }
>               
>               
>               HTMLNode pageNode = ctx.getPageMaker().getPageNode("Freenet 
> browser testing tool");
> @@ -190,7 +194,7 @@
>               HTMLNode mimeAutodetectBox = 
> contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-warning", "MIME 
> Inline"));
>               HTMLNode mimeAutodetectContent = 
> ctx.getPageMaker().getContentNode(mimeAutodetectBox);
>               //mimeAutodetectContent.addChild("img", new String[]{"src", 
> "alt"}, new String[]{"data:image/gif;base64,"+imgWarningMime, "Your browser 
> is probably safe."});
> -             mimeAutodetectContent.addChild("img", new String[]{"src", 
> "alt"}, new String[]{"data:base64,"+imgWarningMime, "Your browser is probably 
> safe."});
> +             mimeAutodetectContent.addChild("img", new String[]{"src", 
> "alt"}, new String[]{"?mimeTest", "Your browser is probably safe."});
>               
>               // #### Test whether we can have more than 10 simultaneous 
> connections to fproxy
>               HTMLNode maxConnectionsPerServerBox = 
> contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-warning", "Number 
> of connections"));
> 
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20061106/b95048ef/attachment.pgp>

Reply via email to