Snake probably laid there until the porcupine stumbled on it, and simply latched onto its head so the porcupine was not able to assume a defensive posture until it was too late. Quills point backwards, so if the porcupine is eaten head first, the quills will just lay flat along the victim’s body. Quills will, however, swell up considerably as they absorb moisture and this might be akin to swallowing a stale dry biscuit whole without butter; the snake could probably use a few beers to wash it down.
Constrictors kill by wrapping their bodies around a victim, not by grabbing the head.
Then again, many snakes do eat carrion as well.