<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,14 +6,21 @@
 
 typedef unsigned char byte;
 
-int read_cmd(byte *buf)
+int read_cmd(byte** buf, int&amp; buffer_size)
 {
   int len;
 
-  if (read_exact(buf, 2) != 2)
+  if (read_exact(*buf, 2) != 2)
     return(-1);
-  len = (buf[0] &lt;&lt; 8) | buf[1];
-  return read_exact(buf, len);
+  len = ((*buf)[0] &lt;&lt; 8) | (*buf)[1];
+
+  if(len &gt; buffer_size){
+    buffer_size = len;
+    delete[] *buf;
+    *buf = new byte[buffer_size];
+  }
+
+  return read_exact(*buf, len);
 }
 
 int write_cmd(byte *buf, int len)</diff>
      <filename>googleurl/src/erl_comm.c</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
 
 typedef unsigned char byte;
 
-int read_cmd(byte *buf);
+int read_cmd(byte **buf, int&amp; buffer_size);
 
 int write_cmd(byte *buf, int len);
 </diff>
      <filename>googleurl/src/erl_comm.h</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@ int main() {
 
   erl_init(NULL, 0); //Required line to initialize erl_interface
 
-  while (read_cmd(buf) &gt; 0) {
+  while (read_cmd(&amp;buf, buffer_size) &gt; 0) {
     tuplep = erl_decode(buf);
     tuple1 = erl_element(1, tuplep);
 </diff>
      <filename>googleurl/src/port.cc</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
 #!/bin/sh
 
+make
+
 erl -pa ebin -eval 'inets:start().' -eval 'googleurl:start(&quot;googleurl/bin/port&quot;).' -eval 'application:start(spider).'</diff>
      <filename>spider_run.sh</filename>
    </modified>
    <modified>
      <diff>@@ -158,9 +158,9 @@ extract_document_links(Html, URL) -&gt;
     StringLinks = lists:map(fun(X) -&gt; binary_to_list(X) end,
                             BinaryLinks),
     CleanedLinks = clean_links(StringLinks, URL),
-    
-    lists:filter(fun(dud) -&gt; false;
-                    (_X) -&gt; true
+%    io:format(&quot;DEBUG: cleaned links: ~p~n&quot;, [CleanedLinks]),
+    lists:filter(fun([$h,$t,$t,$p,$:,$/,$/|_]) -&gt; true;
+                    (_X) -&gt; false
                  end, CleanedLinks).
 
 </diff>
      <filename>src/fetcher.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ac778d0b0700bb5296ba1eeaa28ecbdce2a5bd0c</id>
    </parent>
  </parents>
  <author>
    <name>xanados</name>
    <email>bjterry@Benjamin-Terrys-MacBook-Pro-15.local</email>
  </author>
  <url>http://github.com/formido/spider/commit/ade2440311d3b33a8b9bd00d38e778d9b65c75ae</url>
  <id>ade2440311d3b33a8b9bd00d38e778d9b65c75ae</id>
  <committed-date>2008-09-20T15:06:52-07:00</committed-date>
  <authored-date>2008-09-20T15:06:52-07:00</authored-date>
  <message>Fixed the bug for too long of lists to canonicalize.

Script to run the application.</message>
  <tree>c87f15a20a0f02e4882183795d9908354bd21b30</tree>
  <committer>
    <name>xanados</name>
    <email>bjterry@Benjamin-Terrys-MacBook-Pro-15.local</email>
  </committer>
</commit>
