<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-05-24 23:15 GMT+03:00 Adrian Stanciu <span dir="ltr"><<a href="mailto:adrian.stanciu.pub@gmail.com" target="_blank">adrian.stanciu.pub@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">2015-05-24 23:03 GMT+03:00 Georgiana Diana via so <<a href="mailto:so@cursuri.cs.pub.ro">so@cursuri.cs.pub.ro</a>>:<br>
> Salut,<br>
> Am o intebare legata de fisierul sockop_preload.c, care se regaseste in<br>
> folderul tema5-checker-lin/_test. Din cate inteleg de aici [1], prin<br>
> folosirea comenzii LD_PRELOAD="$libpath" $exec_name (linia 94 din<br>
> run_test.sh) si in urma rescrierii functiilor de send, recv si sendfile in<br>
> biblioteca sockop_preload.so, se limiteaza dimensiunea bufferelor pe care le<br>
> poate serverul primi/trimite de la/catre un client. Cand rulez testele, am<br>
> observat ca primesc request-ul HTTP segmentat; de exemplu, un request pe<br>
> care il primesc se segmenteaza astfel:<br>
><br>
> GET /static/small00. ---> primul request<br>
> dat ---> al doilea request<br>
><br>
> Am inteles bine ce fac functiile bibliotecii sockop_preload ? Cum as putea<br>
> sa imi dau seama ca un client a terminat de transmis o cerere, ca sa pot<br>
> parsa inputul si extrage path-ul catre fisierul cerut ?<br>
><br>
> [1]<br>
> <a href="https://rafalcieslak.wordpress.com/2013/04/02/dynamic-linker-tricks-using-ld_preload-to-cheat-inject-features-and-investigate-programs/" target="_blank">https://rafalcieslak.wordpress.com/2013/04/02/dynamic-linker-tricks-using-ld_preload-to-cheat-inject-features-and-investigate-programs/</a><br>
><br>
<br>
</div></div>Bună, Georgiana!<br>
<br>
Ai înțeles bine. O cerere HTTP este încheiată de un dublu CRLF ("\r\n\r\n") [2].<br>
<br>
[2] <a href="http://www.jmarshall.com/easy/http/#structure" target="_blank">http://www.jmarshall.com/easy/http/#structure</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Adrian<br></font></span></blockquote><div><br></div><div>Ah, asa e. Mersi mult :) </div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font color="#0000ff"><b>Georgiana Diana Ciocirdel</b></font><div>Polytechnic University of Bucharest,</div><div>Computer Science</div></div></div>
</div></div>