agusantoso / harviewer

Automatically exported from code.google.com/p/harviewer
0 stars 0 forks source link

preview/harModel.js Loader unused code? #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In preview/harModel.js, I see:

HarModel.Loader =
{
    run: function(callback, errorCallback)
    {
        var baseUrl = Lib.getURLParameter("baseUrl");

        // Append traling slahs if missing.
        if (baseUrl && baseUrl[baseUrl.length-1] != "/")
            baseUrl += "/";

        var paths = Lib.getURLParameters("path");

...

        // The URL can specify also a locale file (with the same domain).
        // http://domain/har/viewer?path=<local-file-path>
        var filePath = Lib.getURLParameter("path");

so it looks like the bottom bit of code won't be used since the above path will 
always handle the path parameter.

Original issue reported on code.google.com by adrian...@gmail.com on 10 Mar 2011 at 9:11

GoogleCodeExporter commented 9 years ago
Correct, it's removed at r232

Thanks!
Honza

Original comment by odva...@gmail.com on 10 Mar 2011 at 10:11

GoogleCodeExporter commented 9 years ago
sorry it's R233
Honza

Original comment by odva...@gmail.com on 10 Mar 2011 at 10:12

GoogleCodeExporter commented 9 years ago
I guess then the next question is whether or not localLocalArchive is needed 
anymore ;)

Original comment by adrian...@gmail.com on 10 Mar 2011 at 10:14

GoogleCodeExporter commented 9 years ago
Oops, my mistake (I should have tested it before commit). I needed to revert 
the R233 since the code is still needed. Try to load e.g.

http://legoas/har/viewer/webapp/?path=examples/inline-scripts-block.har

Honza

Original comment by odva...@gmail.com on 10 Mar 2011 at 10:30

GoogleCodeExporter commented 9 years ago
Oops, sorry my bad, didn't look closely enough:

        if ((baseUrl || inputUrl) && urls.length > 0)
            return this.loadRemoteArchive(urls, callbackName, callback, errorCallback);

that doesn't happen since baseUrl isn't set.

Original comment by adrian...@gmail.com on 10 Mar 2011 at 10:47

GoogleCodeExporter commented 9 years ago
no problem, closing.
Honza

Original comment by odva...@gmail.com on 10 Mar 2011 at 2:19