Mark Conrad Bates, 27, now of HMP Forest Bank, Salford, must serve 28 weeks on top of his existing sentence, after assaulting the emergency worker as he left a shower cubicle on the segregation unit at HMP Garth, on January 26 last year.
The victim was left with the vile, stinking concoction on his head, hair, inside his shirt and on his clothes.
Bates, now of HMP Forest Bank, Salford, pleaded not guilty to administering a noxious substance, which was accepted by the court.
Prosecuting, Francis McEntee revealed the actual target of his bottle of noxious fluid was a man in the segregation unit, who had mental health difficulties and had a practice of staying awake and ranting through the night.
Mr McEntee said: "It became apparent being closest to that man this defendant was suffering the worst and was suffering a lack of sleep."
"It was approaching midday and the officer and his colleagues were taking lunch to various cells.
"The other inmate's cell was located next to the shower and as they were approaching, the defendant indicated he'd finished in the shoiwer.
"He emerged, it appeared, quite normally. It was noted he had a towel over his arm.
"However as the defendant passed the cell it became apparent he made a gesture towards the door.
"He revealed he had something in his hand, and something was shouted at Connelly's cell.
"Quite naturally the officer stepped forward to restrain the defendant. The officer grabbed him but he continued squeezing the bottle and effectively as a consequence of the noxious substances spraying the door and bouncing back he was covered.
"He described the feeling of a warm liquid landing on his head and trickling down his face.
"He could then smell the strong putrid stench. He felt disgusting and it smelt horrendous."
The court heard he was assisted by other officers and had to put his contaminated clothing into biohazard bags.
In a statement the victim describes repeatedly smelling the stench and having to have several showers to try and erase the smell and get rid of the sense of feeling dirty.
He said it affected staff morale because workers were on tenterhooks fearing copycat incidents.
The court heard Bates, who is serving a lengthy sentence for attempted robbery, has 39 convictions for 72 offences, including assaulting a judge who was sitting on a prison discipline panel for a previous matter, and wounding another inmate.
Defending, Mark Friend, said: "The defendant was not seeking any way to douse the officer with the contents of the bottle.
"Ultimately his sheer recklessness resulted in the officer being the recipient of the attack."
Judge Sara Dodd, sentencing, described it as a "thoroughly unpleasant incident".
She added: " What happened was that it was a prison officer that took the brunt of that foul substance.
"The effects upon him are unsurprising. It must have been an incredibly distressing day for him."