<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:12pt"><div><span>please somebody reply.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>pragya jain</span></div><div class="yahoo_quoted" style="display: block;"> <br> <br> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2"
face="Arial"> On Saturday, 1 February 2014 5:32 PM, pragya jain <prag_2648@yahoo.co.in> wrote:<br> </font> </div> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div class="y_msg_container"><div id="yiv6573122567"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"><div>hi all,</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">somebody help me to understand the following lines of code of ObjectController.PUT() in swift.proxy.controllers.obj.py</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
sans-serif; background-color: transparent; font-style: normal;"><br></div><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><div class="yiv6573122567line" id="yiv6573122567LC750" style="
padding-left:10px;"><span class="yiv6573122567k" style="font-weight:bold;">def</span> <span class="yiv6573122567nf" style="color:rgb(153, 0, 0);font-weight:bold;">PUT</span><span class="yiv6573122567p" style="">(</span><span class="yiv6573122567bp" style="color:rgb(153, 153, 153);">self</span><span class="yiv6573122567p" style="">,</span> <span class="yiv6573122567n" style="">req</span><span class="yiv6573122567p" style="">):</span></div><div class="yiv6573122567line" id="yiv6573122567LC751" style="padding-left:10px;"> <span class="yiv6573122567sd" style="color:rgb(221, 17, 68);">"""HTTP PUT request handler."""</span></div></pre><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">-----------</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="color: rgb(153, 153, 136); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-style: italic; line-height: 18px; white-space: pre;"># do a HEAD request for container sync and checking object versions</span><br></div><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><div class="yiv6573122567line" id="yiv6573122567LC787" style="padding-left:10px;"><span class="yiv6573122567k" style="font-weight:bold;">if</span> <span class="yiv6573122567s" style="color:rgb(221, 17, 68);">'x-timestamp'</span> <span class="yiv6573122567ow" style="font-weight:bold;">in</span> <span class="yiv6573122567n" style="">req</span><span class="yiv6573122567o"
style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">headers</span> <span class="yiv6573122567ow" style="font-weight:bold;">or</span> \</div><div class="yiv6573122567line" id="yiv6573122567LC788" style="padding-left:10px;"> <span class="yiv6573122567p" style="">(</span><span class="yiv6573122567n" style="">object_versions</span> <span class="yiv6573122567ow" style="font-weight:bold;">and</span> <span class="yiv6573122567ow" style="font-weight:bold;">not</span></div><div class="yiv6573122567line" id="yiv6573122567LC789" style="
padding-left:10px;"> <span class="yiv6573122567n" style="">req</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">environ</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">get</span><span class="yiv6573122567p" style="">(</span><span class="yiv6573122567s" style="color:rgb(221, 17, 68);">'swift_versioned_copy'</span><span class="yiv6573122567p" style="">)):</span></div><div class="yiv6573122567line" id="yiv6573122567LC790" style="padding-left:10px;"> <span class="yiv6573122567n" style="">hreq</span> <span class="yiv6573122567o" style="font-weight:bold;">=</span> <span class="yiv6573122567n" style="">Request</span><span class="yiv6573122567o"
style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">blank</span><span class="yiv6573122567p" style="">(</span><span class="yiv6573122567n" style="">req</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">path_info</span><span class="yiv6573122567p" style="">,</span> <span class="yiv6573122567n" style="">headers</span><span class="yiv6573122567o" style="font-weight:bold;">=</span><span class="yiv6573122567p" style="">{</span><span class="yiv6573122567s" style="color:rgb(221, 17, 68);">'X-Newest'</span><span class="yiv6573122567p" style="">:</span> <span class="yiv6573122567s" style="color:rgb(221, 17, 68);">'True'</span><span class="yiv6573122567p" style="
">},</span></div><div class="yiv6573122567line" id="yiv6573122567LC791" style="padding-left:10px;"> <span class="yiv6573122567n" style="">environ</span><span class="yiv6573122567o" style="font-weight:bold;">=</span><span class="yiv6573122567p" style="">{</span><span class="yiv6573122567s" style="color:rgb(221, 17, 68);">'REQUEST_METHOD'</span><span class="yiv6573122567p" style="">:</span> <span class="yiv6573122567s" style="color:rgb(221, 17, 68);">'HEAD'</span><span class="yiv6573122567p" style="">})</span></div><div class="yiv6573122567line" id="yiv6573122567LC792" style="padding-left:10px;"> <span class="yiv6573122567n" style="">hresp</span> <span class="yiv6573122567o"
style="font-weight:bold;">=</span> <span class="yiv6573122567bp" style="color:rgb(153, 153, 153);">self</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">GETorHEAD_base</span><span class="yiv6573122567p" style="">(</span></div><div class="yiv6573122567line" id="yiv6573122567LC793" style="padding-left:10px;"> <span class="yiv6573122567n" style="">hreq</span><span class="yiv6573122567p" style="">,</span> <span class="yiv6573122567n" style="">_</span><span class="yiv6573122567p" style="">(</span><span class="yiv6573122567s" style="color:rgb(221, 17, 68);">'Object'</span><span class="yiv6573122567p" style="
">),</span> <span class="yiv6573122567bp" style="color:rgb(153, 153, 153);">self</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">app</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">object_ring</span><span class="yiv6573122567p" style="">,</span> <span class="yiv6573122567n" style="">partition</span><span class="yiv6573122567p" style="">,</span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"> <span class="yiv6573122567n" style="">hreq</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">swift_entity_path</span><span class="yiv6573122567p" style="">)</span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"><span
class="yiv6573122567p" style="">-----------</span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"><span class="yiv6573122567p" style=""><br></span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"><span class="yiv6573122567p" style=""><span class="yiv6573122567bp" style="color:rgb(153, 153, 153);">in the following lines of code, self</span><span class="yiv6573122567o" style="font-weight:bold;">.</span><span class="yiv6573122567n" style="">GETorHEAD_base</span><span class="yiv6573122567p" style="">() create an HTTPConnection to object server for a HEAD request which is defined in ObjectController.HEAD() of swift.obj.server.py</span><br></span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"><span class="yiv6573122567p" style=""><span class="yiv6573122567p" style="">But we are in process of putting object, object is not written till yet on
the node, then what will it return to </span></span><span class="yiv6573122567n" style="font-family: 'Courier New';">hresp?</span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"><span class="yiv6573122567n" style="font-family: 'Courier New';"><br></span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"><span class="yiv6573122567n" style="font-family: 'Courier New';">thanks </span></div><div class="yiv6573122567line" id="yiv6573122567LC794" style="padding-left:10px;"><span class="yiv6573122567n" style="font-family: 'Courier New';">Pragya Jain</span></div></pre></div></div></div><br><br></div> </blockquote> </div> </div> </div> </div></body></html>