1.3-Core

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

1.3-Core

abergel
Hi!

I cannot open a remote repository apparently with the latest 1.3-core. Gofer and Monticello browser complain. I use:

Pharo1.3a
Latest update: #13196

I am behind a proxy, so I am not sure where the problem comes from (the image or the VM).
It works well with 1.3-Oneclick however.

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Sven Van Caekenberghe
Alexandre,

On 12 May 2011, at 21:38, Alexandre Bergel wrote:

> Hi!
>
> I cannot open a remote repository apparently with the latest 1.3-core. Gofer and Monticello browser complain. I use:
>
> Pharo1.3a
> Latest update: #13196
>
> I am behind a proxy, so I am not sure where the problem comes from (the image or the VM).
> It works well with 1.3-Oneclick however.
>
> Cheers,
> Alexandre

This probably has something to do with Zn now being used for HTTP, proxies should be supported, but I have not tested them myself.

Can you try a simple thing like:

        ZnClient get: 'http://zn.stfx.eu/zn/small.html'

Have a look at ZnNetworkingUtils class>>#socketStreamToUrl:
Does this make the right decision in your setup ?

Sven



Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

abergel
> This probably has something to do with Zn now being used for HTTP, proxies should be supported, but I have not tested them myself.

>
> Can you try a simple thing like:
>
> ZnClient get: 'http://zn.stfx.eu/zn/small.html'

It returns:
 a ZnResponse(400 Bad Request text/html 3181B)

>
> Have a look at ZnNetworkingUtils class>>#socketStreamToUrl:
> Does this make the right decision in your setup ?

Yes it does. ZnNetworkingUtils isProxySet  => true

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Sven Van Caekenberghe

On 12 May 2011, at 22:50, Alexandre Bergel wrote:

>> This probably has something to do with Zn now being used for HTTP, proxies should be supported, but I have not tested them myself.
>
>>
>> Can you try a simple thing like:
>>
>> ZnClient get: 'http://zn.stfx.eu/zn/small.html'
>
> It returns:
> a ZnResponse(400 Bad Request text/html 3181B)

Can you send me the #contents of that ? It should be a 3Kb HTML doc that hopefully explains why your proxy server thinks the request is not OK.

>> Have a look at ZnNetworkingUtils class>>#socketStreamToUrl:
>> Does this make the right decision in your setup ?
>
> Yes it does. ZnNetworkingUtils isProxySet  => true

What are your proxy settings ? Just a hostname and a port ?



Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Sven Van Caekenberghe
In reply to this post by abergel

On 12 May 2011, at 22:50, Alexandre Bergel wrote:

>> Can you try a simple thing like:
>>
>> ZnClient get: 'http://zn.stfx.eu/zn/small.html'
>
> It returns:  a ZnResponse(400 Bad Request text/html 3181B)

OK, here is a quick fix/patch:

ZnRequestLine>>writeOn: stream
        | writeStream |
        writeStream := ZnBivalentWriteStream on: stream.
        writeStream nextPutAll: self method; space.
        ZnNetworkingUtils default isProxySet
                ifTrue: [ self uri printOn: writeStream ]  
                ifFalse: [ self uri printPathQueryFragmentOn: writeStream ].
        writeStream space; nextPutAll: self version; nextPutAll: String crlf

The problem was that for an HTTP request through a proxy, the url in the request line must be absolute.

Let me know if this works for you.

There is another problem as well: access to, at least localhost, should not go through the proxy.
I am fixing that right now.
I want you to be able to run all Zn unit tests with a proxy set, but half of them are accessing localhost.
Anyway, the full fixes will be committed to the Zn repos first, and will have to be migrated to Pharo next.

Regards,

Sven


Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Sven Van Caekenberghe

On 13 May 2011, at 10:24, Sven Van Caekenberghe wrote:

> The problem was that for an HTTP request through a proxy, the url in the request line must be absolute.
>
> Let me know if this works for you.
>
> There is another problem as well: access to, at least localhost, should not go through the proxy.
> I am fixing that right now.
> I want you to be able to run all Zn unit tests with a proxy set, but half of them are accessing localhost.
> Anyway, the full fixes will be committed to the Zn repos first, and will have to be migrated to Pharo next.

Here is the official fix, all Zn units tests should now be green, please confirm.

==================== Summary ====================

Name: Zinc-HTTP-SvenVanCaekenberghe.160
Author: SvenVanCaekenberghe
Time: 13 May 2011, 11:07:48 am
UUID: 619a8697-4d71-4c1c-a99e-fe5e07f3dbb4
Ancestors: Zinc-HTTP-NickAger.159

fixing support for HTTP proxies (thanks Alexandre Bergel for reporting this)
requests to localhost are excluded from being proxied
- ZnRequestLine>>#writeOn: now outputs absolute URLs when proxying
- added ZnNetWorkingUtils class #isProxySet #shouldProxyUrl: and #httpProxy
- added ZnUrl>>#isLocalHost
- changed ZnUrl>>#host: to lowerCase its argument

Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Stéphane Ducasse
tx I will merge it in core once this is ok :)

Stef

On May 13, 2011, at 11:09 AM, Sven Van Caekenberghe wrote:

>
> On 13 May 2011, at 10:24, Sven Van Caekenberghe wrote:
>
>> The problem was that for an HTTP request through a proxy, the url in the request line must be absolute.
>>
>> Let me know if this works for you.
>>
>> There is another problem as well: access to, at least localhost, should not go through the proxy.
>> I am fixing that right now.
>> I want you to be able to run all Zn unit tests with a proxy set, but half of them are accessing localhost.
>> Anyway, the full fixes will be committed to the Zn repos first, and will have to be migrated to Pharo next.
>
> Here is the official fix, all Zn units tests should now be green, please confirm.
>
> ==================== Summary ====================
>
> Name: Zinc-HTTP-SvenVanCaekenberghe.160
> Author: SvenVanCaekenberghe
> Time: 13 May 2011, 11:07:48 am
> UUID: 619a8697-4d71-4c1c-a99e-fe5e07f3dbb4
> Ancestors: Zinc-HTTP-NickAger.159
>
> fixing support for HTTP proxies (thanks Alexandre Bergel for reporting this)
> requests to localhost are excluded from being proxied
> - ZnRequestLine>>#writeOn: now outputs absolute URLs when proxying
> - added ZnNetWorkingUtils class #isProxySet #shouldProxyUrl: and #httpProxy
> - added ZnUrl>>#isLocalHost
> - changed ZnUrl>>#host: to lowerCase its argument
>


Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

abergel
In reply to this post by Sven Van Caekenberghe
>>> Can you try a simple thing like:
>>>
>>> ZnClient get: 'http://zn.stfx.eu/zn/small.html'
>>
>> It returns:
>> a ZnResponse(400 Bad Request text/html 3181B)
>
> Can you send me the #contents of that ? It should be a 3Kb HTML doc that hopefully explains why your proxy server thinks the request is not OK.

It is
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>
<style type="text/css"><!--
 /*
 Stylesheet for Squid Error pages
 Adapted from design by Free CSS Templates
 http://www.freecsstemplates.org
 Released for free under a Creative Commons Attribution 2.5 License
*/

/* Page basics */
* {
        font-family: verdana, sans-serif;
}

html body {
        margin: 0;
        padding: 0;
        background: #efefef;
        font-size: 12px;
        color: #1e1e1e;
}

/* Page displayed title area */
#titles {
        margin-left: 15px;
        padding: 10px;
        padding-left: 100px;
        background: url(''http://www.squid-cache.org/Artwork/SN.png'') no-repeat left;
}

/* initial title */
#titles h1 {
        color: #000000;
}
#titles h2 {
        color: #000000;
}

/* special event: FTP success page titles */
#titles ftpsuccess {
        background-color:#00ff00;
        width:100%;
}

/* Page displayed body content area */
#content {
        padding: 10px;
        background: #ffffff;
}

/* General text */
p {
}

/* error brief description */
#error p {
}

/* some data which may have caused the problem */
#data {
}

/* the error message received from the system or other software */
#sysmsg {
}

pre {
    font-family:sans-serif;
}

/* special event: FTP / Gopher directory listing */
#dirmsg {
    font-family: courier;
    color: black;
    font-size: 10pt;
}
#dirlisting {
    margin-left: 2%;
    margin-right: 2%;
}
#dirlisting tr.entry td.icon,td.filename,td.size,td.date {
    border-bottom: groove;
}
#dirlisting td.size {
    width: 50px;
    text-align: right;
    padding-right: 5px;
}

/* horizontal lines */
hr {
        margin: 0;
}

/* page displayed footer area */
#footer {
        font-size: 9px;
        padding-left: 10px;
}


body
:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
:lang(he) { direction: rtl; float: right; }
 --></style>
</head><body>
<div id="titles">
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="/zn/small.html">/zn/small.html</a></p>

<blockquote id="error">
<p><b>Invalid URL</b></p>
</blockquote>

<p>Some aspect of the requested URL is incorrect.</p>

<p>Some possible problems are:</p>
<ul>
<li><p>Missing or incorrect access protocol (should be <q>http://</q> or similar)</p></li>
<li><p>Missing hostname</p></li>
<li><p>Illegal double-escape in the URL-Path</p></li>
<li><p>Illegal character in hostname; underscores are not allowed.</p></li>
</ul>

<p>Your cache administrator is <a href="mailto:root?subject=CacheErrorInfo%20-%20ERR_INVALID_URL&amp;body=CacheHost%3A%20taltal.dcc.uchile.cl%0D%0AErrPage%3A%20ERR_INVALID_URL%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Fri,%2013%20May%202011%2013%3A10%3A43%20GMT%0D%0A%0D%0AClientIP%3A%2010.0.115.120%0D%0A%0D%0AHTTP%20Request%3A%0D%0A%0D%0A%0D%0A">root</a>.</p>
<br>
</div>

<hr>
<div id="footer">
<p>Generated Fri, 13 May 2011 13:10:43 GMT by taltal.dcc.uchile.cl (squid/3.1.8)</p>
<!-- ERR_INVALID_URL -->
</div>
</body></html>
'

>>> Have a look at ZnNetworkingUtils class>>#socketStreamToUrl:
>>> Does this make the right decision in your setup ?
>>
>> Yes it does. ZnNetworkingUtils isProxySet  => true
>
> What are your proxy settings ? Just a hostname and a port ?

Easy, just a hostname (proxy.dcc.uchile.cl) with a port (8000)
But actually, it would equally work without the proxy. I can connect to internet without the proxy.

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

abergel
In reply to this post by Sven Van Caekenberghe
Hi Sven,

First of all, thanks for caring about the problem I encounter.

> OK, here is a quick fix/patch:
>
> ZnRequestLine>>writeOn: stream
> | writeStream |
> writeStream := ZnBivalentWriteStream on: stream.
> writeStream nextPutAll: self method; space.
> ZnNetworkingUtils default isProxySet
> ifTrue: [ self uri printOn: writeStream ]  
> ifFalse: [ self uri printPathQueryFragmentOn: writeStream ].
> writeStream space; nextPutAll: self version; nextPutAll: String crlf

#default is not defined on 'ZnNetworkingUtils class'. I removed the call to #default, and it works.
Printing the expression gave me a ZnResponse(200 OK text/html;charset=utf-8 113B)
which looks good

> The problem was that for an HTTP request through a proxy, the url in the request line must be absolute.
>
> Let me know if this works for you.

Yes it works.

> There is another problem as well: access to, at least localhost, should not go through the proxy.
> I am fixing that right now.
> I want you to be able to run all Zn unit tests with a proxy set, but half of them are accessing localhost.
> Anyway, the full fixes will be committed to the Zn repos first, and will have to be migrated to Pharo next.

I use a core 13197. Running Zinc tests gives me:
146 run, 118 passes, 0 expected failures, 28 failures, 0 errors, 0 unexpected passes

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

abergel
In reply to this post by Sven Van Caekenberghe
Where am I supposed to find your Zinc-HTTP-SvenVanCaekenberghe.160 ?
In squeaksource.com/Pharo it not there and squeaksource.com/Zinc does not exist.

Cheers,
Alexandre


On 13 May 2011, at 05:09, Sven Van Caekenberghe wrote:

>
> On 13 May 2011, at 10:24, Sven Van Caekenberghe wrote:
>
>> The problem was that for an HTTP request through a proxy, the url in the request line must be absolute.
>>
>> Let me know if this works for you.
>>
>> There is another problem as well: access to, at least localhost, should not go through the proxy.
>> I am fixing that right now.
>> I want you to be able to run all Zn unit tests with a proxy set, but half of them are accessing localhost.
>> Anyway, the full fixes will be committed to the Zn repos first, and will have to be migrated to Pharo next.
>
> Here is the official fix, all Zn units tests should now be green, please confirm.
>
> ==================== Summary ====================
>
> Name: Zinc-HTTP-SvenVanCaekenberghe.160
> Author: SvenVanCaekenberghe
> Time: 13 May 2011, 11:07:48 am
> UUID: 619a8697-4d71-4c1c-a99e-fe5e07f3dbb4
> Ancestors: Zinc-HTTP-NickAger.159
>
> fixing support for HTTP proxies (thanks Alexandre Bergel for reporting this)
> requests to localhost are excluded from being proxied
> - ZnRequestLine>>#writeOn: now outputs absolute URLs when proxying
> - added ZnNetWorkingUtils class #isProxySet #shouldProxyUrl: and #httpProxy
> - added ZnUrl>>#isLocalHost
> - changed ZnUrl>>#host: to lowerCase its argument
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Sven Van Caekenberghe

On 13 May 2011, at 15:25, Alexandre Bergel wrote:

> Where am I supposed to find your Zinc-HTTP-SvenVanCaekenberghe.160 ?
> In squeaksource.com/Pharo it not there and squeaksource.com/Zinc does not exist.

Long answer: http://zn.stfx.eu

Short answer: http://www.squeaksource.com/ZincHTTPComponents

Sven


Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Sven Van Caekenberghe
In reply to this post by abergel

On 13 May 2011, at 15:24, Alexandre Bergel wrote:

> I use a core 13197. Running Zinc tests gives me:
> 146 run, 118 passes, 0 expected failures, 28 failures, 0 errors, 0 unexpected passes

For all tests to pass, you need the very latest version (160) where the proxy is bypassed for localhost.
Also, make sure no other ZnServers are running (they would block the 1701 port needed by the tests).

Sven


Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

Sven Van Caekenberghe
In reply to this post by abergel

On 13 May 2011, at 15:12, Alexandre Bergel wrote:

> First of all, thanks for caring about the problem I encounter.

> Easy, just a hostname (proxy.dcc.uchile.cl) with a port (8000)
> But actually, it would equally work without the proxy. I can connect to internet without the proxy.

You help squash yet another bug, that is good!

Sven


Reply | Threaded
Open this post in threaded view
|

Re: 1.3-Core

abergel
In reply to this post by Sven Van Caekenberghe
I updated Zinc-HTTP and Zinc-Tests from your server.
Running the tests gives me: 151 run, 151 passes, 0 expected failures, 0 failures, 0 errors, 0 unexpected passes

Really cool!

Alexandre

On 13 May 2011, at 09:39, Sven Van Caekenberghe wrote:

>
> On 13 May 2011, at 15:24, Alexandre Bergel wrote:
>
>> I use a core 13197. Running Zinc tests gives me:
>> 146 run, 118 passes, 0 expected failures, 28 failures, 0 errors, 0 unexpected passes
>
> For all tests to pass, you need the very latest version (160) where the proxy is bypassed for localhost.
> Also, make sure no other ZnServers are running (they would block the 1701 port needed by the tests).
>
> Sven
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.