I saw this in Karnataka State, South India. It was slowly surrounding itself in a cocoon, without any movements that I could detect. Behind it (right side) there is another one deep in a cocoon, or rather a white web of semi-transparent stuff. It seemed to be the same type of creature, but about a third the size. I watched this thing for about 5 days. It didn't move, but the last few days, though it was still alive, it started to be surrounded more and more by the white web already mentioned. One feature worth noting is that the head seems to be in two segments, separated down the middle by the line you can clearly see.
Oh lovely, it's an ant-mimic spider - it has eight legs. What you take to be the head are its jaws. It's head region is level with the bases of the 1st and 2nd pair of legs - you can see its posterior eyes near the 2nd pair..